ICU-11746 more warning cleanup

X-SVN-Rev: 39296
This commit is contained in:
Steven R. Loomis 2016-09-20 21:03:19 +00:00
parent 104b90bc3f
commit 3a8a02cae1
11 changed files with 45 additions and 18 deletions

View 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)) {

View 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 = {

View 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 */

View 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={

View file

@ -1074,7 +1074,10 @@ static const UConverterImpl _CESU8Impl={
NULL,
NULL,
NULL,
ucnv_getCompleteUnicodeSet
ucnv_getCompleteUnicodeSet,
NULL,
NULL
};
static const UConverterStaticData _CESU8StaticData={

View 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;

View 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;

View 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;

View 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);

View 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];

View 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);