From cdb62c7c6aab899aec2fc12e066ab4d9ac59dbaf Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Wed, 19 May 2004 06:28:40 +0000 Subject: [PATCH] ICU-3500 Fix some compiler warnings X-SVN-Rev: 15402 --- icu4c/source/test/cintltst/nccbtst.c | 4 +- icu4c/source/test/cintltst/ncnvtst.c | 57 ++++++++++++++------------- icu4c/source/test/cintltst/nucnvtst.c | 10 ++--- 3 files changed, 36 insertions(+), 35 deletions(-) diff --git a/icu4c/source/test/cintltst/nccbtst.c b/icu4c/source/test/cintltst/nccbtst.c index e2acf8437f..ad5c47b005 100644 --- a/icu4c/source/test/cintltst/nccbtst.c +++ b/icu4c/source/test/cintltst/nccbtst.c @@ -73,8 +73,8 @@ static void setNuConvTestName(const char *codepage, const char *direction) sprintf(gNuConvTestName, "[testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]", codepage, direction, - gInBufferSize, - gOutBufferSize); + (int)gInBufferSize, + (int)gOutBufferSize); } diff --git a/icu4c/source/test/cintltst/ncnvtst.c b/icu4c/source/test/cintltst/ncnvtst.c index 17a784b48d..5fcc5e954c 100644 --- a/icu4c/source/test/cintltst/ncnvtst.c +++ b/icu4c/source/test/cintltst/ncnvtst.c @@ -14,6 +14,7 @@ */ #include #include +#include #include "unicode/uloc.h" #include "unicode/ucnv.h" #include "unicode/utypes.h" @@ -50,11 +51,11 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar * static void setNuConvTestName(const char *codepage, const char *direction) { - sprintf(gNuConvTestName, "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]", - codepage, - direction, - gInBufferSize, - gOutBufferSize); + sprintf(gNuConvTestName, "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]", + codepage, + direction, + (int)gInBufferSize, + (int)gOutBufferSize); } @@ -893,9 +894,9 @@ static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *e if(memcmp(buffer, expect, expectLen)){ log_err("String does not match. FROM Unicode to codePage%s\n", codepage); - printf("\nGot:"); + log_info("\nGot:"); printSeqErr((const unsigned char *)buffer, expectLen); - printf("\nExpected:"); + log_info("\nExpected:"); printSeqErr((const unsigned char *)expect, expectLen); return FALSE; } @@ -907,13 +908,13 @@ static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *e log_verbose("comparing %d offsets..\n", targ-buffer); if(memcmp(offsetBuffer,expectOffsets,(targ-buffer) * sizeof(int32_t) )){ log_err("did not get the expected offsets. for FROM Unicode to %s\n", codepage); - printf("\nGot : "); + log_info("\nGot : "); printSeqErr((const unsigned char*)buffer, targ-buffer); for(p=buffer;p