ICU-900 Fixed some compiler warnings

X-SVN-Rev: 4873
This commit is contained in:
George Rhoten 2001-06-01 22:08:06 +00:00
parent ea08d72509
commit a869e621bb

View File

@ -35,8 +35,10 @@
#include "umutex.h" #include "umutex.h"
#include "uhash.h" #include "uhash.h"
#ifdef UCOL_DEBUG
#include <stdio.h> #include <stdio.h>
#include <limits.h> #include <limits.h>
#endif
/* added by synwee for trie manipulation*/ /* added by synwee for trie manipulation*/
#define STAGE_1_SHIFT_ 10 #define STAGE_1_SHIFT_ 10
@ -61,8 +63,8 @@ static const UChar utf16Fixup[32]={
}; };
static UBool U_CALLCONV static UBool U_CALLCONV
isAcceptableUCA(void *context, isAcceptableUCA(void * /*context*/,
const char *type, const char *name, const char * /*type*/, const char * /*name*/,
const UDataInfo *pInfo){ const UDataInfo *pInfo){
/* context, type & name are intentionally not used */ /* context, type & name are intentionally not used */
if( pInfo->size>=20 && if( pInfo->size>=20 &&
@ -343,7 +345,7 @@ ucol_openRules( const UChar *rules,
/*src.source = rules;*/ /*src.source = rules;*/
src.source = (UChar *)uprv_malloc((2*rulesLength+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar)); src.source = (UChar *)uprv_malloc((2*rulesLength+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar));
nSize = unorm_normalize(rules, rulesLength, UNORM_NFD, 0, src.source, 2*rulesLength+UCOL_TOK_EXTRA_RULE_SPACE_SIZE, status); nSize = unorm_normalize(rules, rulesLength, UNORM_NFD, 0, src.source, 2*rulesLength+UCOL_TOK_EXTRA_RULE_SPACE_SIZE, status);
if(nSize > 2*rulesLength+UCOL_TOK_EXTRA_RULE_SPACE_SIZE || *status == U_BUFFER_OVERFLOW_ERROR) { if(nSize > (uint32_t)(2*rulesLength+UCOL_TOK_EXTRA_RULE_SPACE_SIZE) || *status == U_BUFFER_OVERFLOW_ERROR) {
*status = U_ZERO_ERROR; *status = U_ZERO_ERROR;
src.source = (UChar *)realloc(src.source, (nSize+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar)); src.source = (UChar *)realloc(src.source, (nSize+UCOL_TOK_EXTRA_RULE_SPACE_SIZE)*sizeof(UChar));
nSize = unorm_normalize(rules, rulesLength, UNORM_NFD, 0, src.source, nSize+UCOL_TOK_EXTRA_RULE_SPACE_SIZE, status); nSize = unorm_normalize(rules, rulesLength, UNORM_NFD, 0, src.source, nSize+UCOL_TOK_EXTRA_RULE_SPACE_SIZE, status);