]> granicus.if.org Git - icu/commitdiff
ICU-13461 Fixing signed/unsigned operation that was causing runtime warnings in Clang.
authorShane Carr <shane@unicode.org>
Fri, 1 Dec 2017 07:46:22 +0000 (07:46 +0000)
committerShane Carr <shane@unicode.org>
Fri, 1 Dec 2017 07:46:22 +0000 (07:46 +0000)
X-SVN-Rev: 40681

icu4c/source/common/bmpset.cpp

index f84bfd7f5bfcf1044aff8e349226cd04c24f0f59..35bc80dce359eb90ffcdd968c209b3361c5e5f7f 100644 (file)
@@ -100,9 +100,9 @@ static void set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) {
             ++lead;
         }
         if(lead<limitLead) {
-            bits=~((1<<lead)-1);
+            bits=~(((unsigned)1<<lead)-1);
             if(limitLead<0x20) {
-                bits&=(1<<limitLead)-1;
+                bits&=((unsigned)1<<limitLead)-1;
             }
             for(trail=0; trail<64; ++trail) {
                 table[trail]|=bits;