diff --git a/icu4c/source/i18n/ucol.cpp b/icu4c/source/i18n/ucol.cpp index 5f46d9302d..0f5882daab 100644 --- a/icu4c/source/i18n/ucol.cpp +++ b/icu4c/source/i18n/ucol.cpp @@ -3670,7 +3670,6 @@ inline uint8_t *packFrench(uint8_t *primaries, uint8_t *primEnd, uint8_t *second uint8_t secondary; int32_t count2 = 0; uint32_t i = 0, size = 0; - uint8_t *primStart = primaries; // we use i here since the key size already accounts for terminators, so we'll discard the increment addWithIncrement(primaries, primEnd, i, UCOL_LEVELTERMINATOR); /* If there are any unresolved continuation secondaries, reverse them here so that we can reverse the whole secondary thing */ diff --git a/icu4c/source/i18n/ucol_bld.cpp b/icu4c/source/i18n/ucol_bld.cpp index 1eb7e4cde1..b33c1e4486 100644 --- a/icu4c/source/i18n/ucol_bld.cpp +++ b/icu4c/source/i18n/ucol_bld.cpp @@ -915,7 +915,6 @@ ucol_uprv_bld_copyRangeFromUCA(UColTokenParser *src, tempUCATable *t, UErrorCode *status) { //UChar decomp[256]; uint32_t CE = UCOL_NOT_FOUND; - uint32_t tag = UCOL_NOT_FOUND; UChar32 u = 0; UCAElements el; el.isThai = FALSE; @@ -1072,8 +1071,6 @@ UCATableHeader *ucol_assembleTailoringTable(UColTokenParser *src, UErrorCode *st } } - uint32_t CE = UCOL_NOT_FOUND; - UChar u = 0; UCAElements el; el.isThai = FALSE; el.prefixSize = 0; diff --git a/icu4c/source/test/cintltst/capitst.c b/icu4c/source/test/cintltst/capitst.c index ca1d5f14a0..7c6fb05762 100644 --- a/icu4c/source/test/cintltst/capitst.c +++ b/icu4c/source/test/cintltst/capitst.c @@ -1505,8 +1505,8 @@ static void TestAttribute() void TestGetTailoredSet() { struct { - char *rules; - char *tests[20]; + const char *rules; + const char *tests[20]; int32_t testsize; } setTest[] = { { "&a < \\u212b", { "\\u212b", "A\\u030a", "\\u00c5" }, 3}, diff --git a/icu4c/source/test/cintltst/cloctst.c b/icu4c/source/test/cintltst/cloctst.c index 920e7aaee5..aa4378270d 100644 --- a/icu4c/source/test/cintltst/cloctst.c +++ b/icu4c/source/test/cintltst/cloctst.c @@ -23,6 +23,7 @@ #include "unicode/ustring.h" #include "cintltst.h" #include "ccolltst.h" +#include "cstring.h" #include "unicode/ures.h" #ifdef WIN32 diff --git a/icu4c/source/test/cintltst/cnormtst.c b/icu4c/source/test/cintltst/cnormtst.c index 46d4d2b4ab..a182e31387 100644 --- a/icu4c/source/test/cintltst/cnormtst.c +++ b/icu4c/source/test/cintltst/cnormtst.c @@ -101,6 +101,8 @@ const static char* compatTests[][3] = { }; +void addNormTest(TestNode** root); + void addNormTest(TestNode** root) { addTest(root, &TestAPI, "tscoll/cnormtst/TestAPI"); diff --git a/icu4c/source/test/cintltst/usettest.c b/icu4c/source/test/cintltst/usettest.c index c37b8e0435..15cb214a11 100644 --- a/icu4c/source/test/cintltst/usettest.c +++ b/icu4c/source/test/cintltst/usettest.c @@ -44,7 +44,6 @@ addUSetTest(TestNode** root) { static void Testj2269() { UErrorCode status = U_ZERO_ERROR; UChar a[4] = { 0x61, 0x62, 0x63, 0 }; - UChar b[4] = { 0x61, 0x62, 0x63, 0 }; USet *s = uset_open(1, 0); uset_addString(s, a, 3); a[0] = 0x63; a[1] = 0x63; diff --git a/icu4c/source/tools/genrb/derb.c b/icu4c/source/tools/genrb/derb.c index 3161756071..ba5bd20879 100644 --- a/icu4c/source/tools/genrb/derb.c +++ b/icu4c/source/tools/genrb/derb.c @@ -698,7 +698,6 @@ static void printOutBundle(FILE *out, UConverter *converter, UResourceBundle *re } } } else { /* we have to use low level access to do this */ - uint16_t i = 0; Resource r = RES_BOGUS; for(i = 0; i < ures_getSize(resource); i++) { /* need to know if it's an alias */ diff --git a/icu4c/source/tools/genrb/parse.c b/icu4c/source/tools/genrb/parse.c index e35d087f1e..fc203c956c 100644 --- a/icu4c/source/tools/genrb/parse.c +++ b/icu4c/source/tools/genrb/parse.c @@ -1225,13 +1225,8 @@ parseInclude(char *tag, uint32_t startline, UErrorCode *status) char *filename; uint32_t line; UChar *pTarget = NULL; - UChar *target = NULL; - UChar *targetLimit = NULL; UCHARBUF *ucbuf; - UChar32 c = 0; - uint32_t size = 0; - UBool quoted = FALSE; char *fullname = NULL; int32_t count = 0; const char* cp = NULL; diff --git a/icu4c/source/tools/genrb/rle.c b/icu4c/source/tools/genrb/rle.c index 42cfaec55b..6a6a5b612c 100644 --- a/icu4c/source/tools/genrb/rle.c +++ b/icu4c/source/tools/genrb/rle.c @@ -104,7 +104,6 @@ encodeRunByte(uint16_t* buffer,uint16_t* bufLimit, uint8_t value, int32_t length */ static int32_t encodeRunShort(uint16_t* buffer,uint16_t* bufLimit, uint16_t value, int32_t length,UErrorCode* status) { - uint16_t* saveBuf = buffer; int32_t num=0; if (length < 4) { int j=0; @@ -147,7 +146,6 @@ encodeRunShort(uint16_t* buffer,uint16_t* bufLimit, uint16_t value, int32_t leng */ int32_t usArrayToRLEString(const uint16_t* src,int32_t srcLen,uint16_t* buffer, int32_t bufLen,UErrorCode* status) { - const uint16_t* saveBuf = buffer; uint16_t* bufLimit = buffer+bufLen; int32_t num = 0; if(buffer < bufLimit){ diff --git a/icu4c/source/tools/genrb/wrtxml.c b/icu4c/source/tools/genrb/wrtxml.c index aadc974a28..2773fa99a6 100644 --- a/icu4c/source/tools/genrb/wrtxml.c +++ b/icu4c/source/tools/genrb/wrtxml.c @@ -101,7 +101,6 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength int32_t i=0; char* dest=NULL; char* temp=NULL; - int32_t len=0; int32_t destLen=0; if(status==NULL || U_FAILURE(*status) || pDest==NULL || srcLen==0 || src == NULL){ @@ -383,7 +382,7 @@ bin_write_xml( struct SResource *res, UErrorCode *status) { (res->u.fBinaryValue.fFileName !=NULL ? uprv_strlen(res->u.fBinaryValue.fFileName) :0))); char* buffer = NULL; - char* ext = NULL; + const char* ext = NULL; fn[0]=0; if(res->u.fBinaryValue.fLength>100){ @@ -454,7 +453,6 @@ bin_write_xml( struct SResource *res, UErrorCode *status) { } -static UBool start = TRUE; static void table_write_xml(struct SResource *res, UErrorCode *status) { diff --git a/icu4c/source/tools/toolutil/ucbuf.h b/icu4c/source/tools/toolutil/ucbuf.h index 7ce57b2fa7..e8d5a768ca 100644 --- a/icu4c/source/tools/toolutil/ucbuf.h +++ b/icu4c/source/tools/toolutil/ucbuf.h @@ -162,7 +162,8 @@ ucbuf_ungetc(int32_t ungetChar,UCHARBUF* buf); * @return The input FileStream if its charset was autodetected; NULL otherwise. */ U_CAPI FileStream * U_EXPORT2 -ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, int32_t* signatureLength,UErrorCode* error); +ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, +int32_t* signatureLength, UErrorCode* status); /** * Autodetects the encoding of the file stream. Only Unicode charsets are autodectected. @@ -181,7 +182,7 @@ ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, int32_ */ U_CAPI UBool U_EXPORT2 -ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t* signatureLength, UErrorCode* error); +ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t* signatureLength, UErrorCode* status); /** * Returns the approximate size in UChars required for converting the file to UChars diff --git a/icu4c/source/tools/toolutil/uperf.cpp b/icu4c/source/tools/toolutil/uperf.cpp index 6d3f186fa0..7ee2c27cc1 100644 --- a/icu4c/source/tools/toolutil/uperf.cpp +++ b/icu4c/source/tools/toolutil/uperf.cpp @@ -361,9 +361,9 @@ UBool UPerfTest::runTestLoop( char* testname, char* par ) } */ if(events == -1){ - fprintf(stdout,"= %s end: %f loops: %i operations: %i \n",name , t , loops, testFunction->getOperationsPerIteration()); + fprintf(stdout,"= %s end: %f loops: %i operations: %li \n",name , t , loops, testFunction->getOperationsPerIteration()); }else{ - fprintf(stdout,"= %s end: %f loops: %i operations: %i events: %i\n",name , t , loops, testFunction->getOperationsPerIteration(), events); + fprintf(stdout,"= %s end: %f loops: %i operations: %li events: %li\n",name , t , loops, testFunction->getOperationsPerIteration(), events); } }else{ /* @@ -374,9 +374,9 @@ UBool UPerfTest::runTestLoop( char* testname, char* par ) } */ if(events == -1){ - fprintf(stdout,"= %s end %f %i %i\n",name , t , loops, testFunction->getOperationsPerIteration()); + fprintf(stdout,"= %s end %f %i %li\n",name , t , loops, testFunction->getOperationsPerIteration()); }else{ - fprintf(stdout,"= %s end %f %i %i %i\n",name , t , loops, testFunction->getOperationsPerIteration(), events); + fprintf(stdout,"= %s end %f %i %li %li\n",name , t , loops, testFunction->getOperationsPerIteration(), events); } } } diff --git a/icu4c/source/tools/toolutil/utimer.h b/icu4c/source/tools/toolutil/utimer.h index bdbe07a3b4..a7f9c63d8f 100644 --- a/icu4c/source/tools/toolutil/utimer.h +++ b/icu4c/source/tools/toolutil/utimer.h @@ -183,7 +183,7 @@ typedef void FuntionToBeTimed(void* param); struct timeval placeHolder; }; - int32_t uprv_initFrequency(UTimer* timer) + int32_t uprv_initFrequency(UTimer* /*timer*/) { return 0; } @@ -198,7 +198,7 @@ typedef void FuntionToBeTimed(void* param); t2 = (double)timer2->start.tv_sec + (double)timer2->start.tv_usec/(1000*1000); return (t2-t1); } - UBool uprv_compareFrequency(UTimer* timer1, UTimer* timer2){ + UBool uprv_compareFrequency(UTimer* /*timer1*/, UTimer* /*timer2*/){ return TRUE; }