]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/cintltst/ncnvtst.c
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / cintltst / ncnvtst.c
index 255020a2e9c9f2e82454f660bdc6425c64082ab7..77f7fbc9669932a782ada30762be5ffe3644b871 100644 (file)
@@ -699,7 +699,7 @@ static void TestRegressionUTF8(){
         offset16 = 0;
         offset8 = 0;
         while(currCh <= UNICODE_LIMIT
-            && offset16 < (MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN)
+            && offset16 < ((int32_t)(MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN))
             && offset8 < (MAX_LENGTH - MAX_UTF8_LEN))
         {
             if (currCh == SURROGATE_HIGH_START) {
@@ -770,8 +770,8 @@ static void TestRegressionUTF32(){
         offset16 = 0;
         offset32 = 0;
         while(currCh <= UNICODE_LIMIT
-            && offset16 < (MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN)
-            && offset32 < (MAX_LENGTH/sizeof(UChar32) - MAX_UTF32_LEN))
+            && offset16 < ((int32_t)(MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN))
+            && offset32 < ((int32_t)(MAX_LENGTH/sizeof(UChar32) - MAX_UTF32_LEN)))
         {
             if (currCh == SURROGATE_HIGH_START) {
                 currCh = SURROGATE_LOW_END + 1; /* Skip surrogate range */
@@ -968,7 +968,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){
 
         if(!testConvertToU(sampleText1, sizeof(sampleText1),
                  expected1, UPRV_LENGTHOF(expected1),"utf8", UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1,FALSE))
-            log_err("utf8->u with substitute did not match.\n");;
+            log_err("utf8->u with substitute did not match.\n");
     }
 
 #if !UCONFIG_NO_LEGACY_CONVERSION