]> granicus.if.org Git - icu/commitdiff
ICU-11746 more warning cleanup
authorSteven R. Loomis <srl@icu-project.org>
Tue, 20 Sep 2016 21:03:19 +0000 (21:03 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Tue, 20 Sep 2016 21:03:19 +0000 (21:03 +0000)
X-SVN-Rev: 39296

icu4c/source/common/propsvec.c
icu4c/source/common/ucnv_u16.c
icu4c/source/common/ucnv_u32.c
icu4c/source/common/ucnv_u7.c
icu4c/source/common/ucnv_u8.c
icu4c/source/common/udataswp.c
icu4c/source/io/sprintf.c
icu4c/source/io/sscanf.c
icu4c/source/tools/toolutil/flagparser.c
icu4c/source/tools/toolutil/ucm.c
icu4c/source/tools/toolutil/unewdata.c

index 01fb5c93a5f87fec3f31b2821903be5448107a16..ed4d89954b872f72fa66e67def7ff4d8eaa2a517 100644 (file)
@@ -479,7 +479,7 @@ upvec_cloneArray(const UPropsVectors *pv,
 
 U_CAPI UTrie2 * U_EXPORT2
 upvec_compactToUTrie2WithRowIndexes(UPropsVectors *pv, UErrorCode *pErrorCode) {
-    UPVecToUTrie2Context toUTrie2={ NULL };
+    UPVecToUTrie2Context toUTrie2={ NULL, 0, 0, 0 };
     upvec_compact(pv, upvec_compactToUTrie2Handler, &toUTrie2, pErrorCode);
     utrie2_freeze(toUTrie2.trie, UTRIE2_16_VALUE_BITS, pErrorCode);
     if(U_FAILURE(*pErrorCode)) {
index 5947ef2e12a378c152bc4f48ad5b712c0918ad44..1458a8a4b320423a652d1db4d3782e148792a935 100644 (file)
@@ -623,7 +623,10 @@ static const UConverterImpl _UTF16BEImpl={
     _UTF16BEGetName,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 static const UConverterStaticData _UTF16BEStaticData={
@@ -1219,7 +1222,10 @@ static const UConverterImpl _UTF16LEImpl={
     _UTF16LEGetName,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 
@@ -1488,7 +1494,10 @@ static const UConverterImpl _UTF16Impl = {
     _UTF16GetName,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 static const UConverterStaticData _UTF16StaticData = {
@@ -1530,7 +1539,10 @@ static const UConverterImpl _UTF16v2Impl = {
     _UTF16GetName,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 static const UConverterStaticData _UTF16v2StaticData = {
index 62f2f93d4a9ba0003defc3136f2fb5b32e6a62df..b0a0fe28529ed2a04a100d5a87e095874b9ded2c 100644 (file)
@@ -482,7 +482,10 @@ static const UConverterImpl _UTF32BEImpl = {
     NULL,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 /* The 1232 CCSID refers to any version of Unicode with any endianess of UTF-32 */
@@ -974,7 +977,10 @@ static const UConverterImpl _UTF32LEImpl = {
     NULL,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 /* The 1232 CCSID refers to any version of Unicode with any endianess of UTF-32 */
@@ -1216,7 +1222,10 @@ static const UConverterImpl _UTF32Impl = {
     NULL,
     NULL,
     NULL,
-    ucnv_getNonSurrogateUnicodeSet
+    ucnv_getNonSurrogateUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 /* The 1236 CCSID refers to any version of Unicode with a BOM sensitive endianess of UTF-32 */
index c381c7686aa968d94d1db05e0a7761f8d83bdbab..c3b4d74b9a914959b9e8cf85276c409170f26267 100644 (file)
@@ -762,7 +762,10 @@ static const UConverterImpl _UTF7Impl={
     _UTF7GetName,
     NULL, /* we don't need writeSub() because we never call a callback at fromUnicode() */
     NULL,
-    ucnv_getCompleteUnicodeSet
+    ucnv_getCompleteUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 static const UConverterStaticData _UTF7StaticData={
index dd17dcebe5ffcc511457d39bd679f7c4e781207e..0258347aeb1111f86560d1b91ea45ab7efae6a45 100644 (file)
@@ -1074,7 +1074,10 @@ static const UConverterImpl _CESU8Impl={
     NULL,
     NULL,
     NULL,
-    ucnv_getCompleteUnicodeSet
+    ucnv_getCompleteUnicodeSet,
+
+    NULL,
+    NULL
 };
 
 static const UConverterStaticData _CESU8StaticData={
index 94181ade507d9e6c173f6b547448fd3a27ec2b7f..f47ac1f5e06f355b2a457a8cdff2062873c6bd35 100644 (file)
@@ -300,7 +300,7 @@ udata_swapDataHeader(const UDataSwapper *ds,
 
     /* check minimum length and magic bytes */
     pHeader=(const DataHeader *)inData;
-    if( (length>=0 && length<sizeof(DataHeader)) ||
+    if( (length>=0 && length<(int32_t)sizeof(DataHeader)) ||
         pHeader->dataHeader.magic1!=0xda ||
         pHeader->dataHeader.magic2!=0x27 ||
         pHeader->info.sizeofUChar!=2
@@ -427,7 +427,7 @@ udata_openSwapperForInputData(const void *data, int32_t length,
         return NULL;
     }
     if( data==NULL ||
-        (length>=0 && length<sizeof(DataHeader)) ||
+        (length>=0 && length<(int32_t)sizeof(DataHeader)) ||
         outCharset>U_EBCDIC_FAMILY
     ) {
         *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
index 59fd89c49247011c630b00cf6df885b69408f3db..ff143deb28874f06d6a5b597baf63ab1b84c9e7d 100644 (file)
@@ -181,7 +181,7 @@ u_vsnprintf(UChar       *buffer,
     int32_t size = (int32_t)strlen(patternSpecification) + 1;
 
     /* convert from the default codepage to Unicode */
-    if (size >= MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
+    if (size >= (int32_t)MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
         pattern = (UChar *)uprv_malloc(size * sizeof(UChar));
         if(pattern == 0) {
             return 0;
index 51f80f182a7e314638524cca86f886d91fcb8d40..31ad8965fc2faeea762827b5f14df054a4e03378 100644 (file)
@@ -73,7 +73,7 @@ u_vsscanf(const UChar   *buffer,
     int32_t size = (int32_t)uprv_strlen(patternSpecification) + 1;
 
     /* convert from the default codepage to Unicode */
-    if (size >= MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
+    if (size >= (int32_t)MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
         pattern = (UChar *)uprv_malloc(size * sizeof(UChar));
         if(pattern == 0) {
             return 0;
index 230466ebc71c6c7a81a4e1395c8dc1f1fdb8e719..0ffc3715bfdab1e72872a40e3ad56ae865ac38b5 100644 (file)
@@ -63,7 +63,7 @@ parseFlagsFile(const char *fileName, char **flagBuffer, int32_t flagBufferSize,
                 continue;
             }
 
-            if (uprv_strlen(buffer) == (currentBufferSize - 1) && buffer[currentBufferSize-2] != '\n') {
+            if ((int32_t)uprv_strlen(buffer) == (currentBufferSize - 1) && buffer[currentBufferSize-2] != '\n') {
                 /* Allocate more space for buffer if it didnot read the entrire line */
                 allocateMoreSpace = TRUE;
                 T_FileStream_rewind(f);
index afdcb92a954fd97e4429682a64e93a5ac2d6079b..8d4cdfc40f1e45286931a2ab79263f61913f1ec0 100644 (file)
@@ -1126,7 +1126,7 @@ ucm_addMappingAuto(UCMFile *ucm, UBool forBase, UCMStates *baseStates,
 
 U_CAPI UBool U_EXPORT2
 ucm_addMappingFromLine(UCMFile *ucm, const char *line, UBool forBase, UCMStates *baseStates) {
-    UCMapping m={ 0 };
+  UCMapping m={ 0, {0}, 0, 0, 0, 0 };
     UChar32 codePoints[UCNV_EXT_MAX_UCHARS];
     uint8_t bytes[UCNV_EXT_MAX_BYTES];
 
index fbf1124811ea8319f77d8a6e0342ce9a0f0aa705..0fb9d439c3662a558f97a8b393aa88e4f51e251e 100644 (file)
@@ -41,7 +41,7 @@ udata_create(const char *dir, const char *type, const char *name,
     uint16_t headerSize, commentLength;
     char filename[512];
     uint8_t bytes[16];
-    int length;
+    int32_t length;
 
     if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
         return NULL;
@@ -76,7 +76,7 @@ udata_create(const char *dir, const char *type, const char *name,
 
         
      /* LDH buffer Length error check */
-    if(length  > (sizeof(filename) - 1))
+    if(length  > ((int32_t)sizeof(filename) - 1))
     {
            *pErrorCode = U_BUFFER_OVERFLOW_ERROR;
            uprv_free(pData);