ICU-5966 Fixed some compiler warnings
X-SVN-Rev: 23806
This commit is contained in:
parent
3c266c752e
commit
cbd785db50
@ -546,7 +546,8 @@ void RBBITableBuilder::buildStateTable() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RBBIStateDescriptor *failState;
|
RBBIStateDescriptor *failState;
|
||||||
RBBIStateDescriptor *initialState;
|
// Set it to NULL to avoid uninitialized warning
|
||||||
|
RBBIStateDescriptor *initialState = NULL;
|
||||||
//
|
//
|
||||||
// Add a dummy state 0 - the stop state. Not from Aho.
|
// Add a dummy state 0 - the stop state. Not from Aho.
|
||||||
int lastInputSymbol = fRB->fSetBuilder->getNumCharCategories() - 1;
|
int lastInputSymbol = fRB->fSetBuilder->getNumCharCategories() - 1;
|
||||||
|
@ -492,6 +492,7 @@ int32_t JapaneseCalendar::handleGetLimit(UCalendarDateFields field, ELimitType l
|
|||||||
return 1;
|
return 1;
|
||||||
case UCAL_LIMIT_LEAST_MAXIMUM:
|
case UCAL_LIMIT_LEAST_MAXIMUM:
|
||||||
return 1;
|
return 1;
|
||||||
|
case UCAL_LIMIT_COUNT: //added to avoid warning
|
||||||
case UCAL_LIMIT_MAXIMUM:
|
case UCAL_LIMIT_MAXIMUM:
|
||||||
return GregorianCalendar::handleGetLimit(UCAL_YEAR, UCAL_LIMIT_MAXIMUM) - kEraInfo[kCurrentEra].year;
|
return GregorianCalendar::handleGetLimit(UCAL_YEAR, UCAL_LIMIT_MAXIMUM) - kEraInfo[kCurrentEra].year;
|
||||||
}
|
}
|
||||||
|
@ -938,7 +938,7 @@ SimpleDateFormat::initGMTFormatters(UErrorCode &status) {
|
|||||||
fGMTFormatters = (MessageFormat**)uprv_malloc(kNumGMTFormatters * sizeof(MessageFormat*));
|
fGMTFormatters = (MessageFormat**)uprv_malloc(kNumGMTFormatters * sizeof(MessageFormat*));
|
||||||
if (fGMTFormatters) {
|
if (fGMTFormatters) {
|
||||||
for (int32_t i = 0; i < kNumGMTFormatters; i++) {
|
for (int32_t i = 0; i < kNumGMTFormatters; i++) {
|
||||||
const UnicodeString *hourPattern;
|
const UnicodeString *hourPattern = NULL; //initialized it to avoid warning
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case kGMTNegativeHMS:
|
case kGMTNegativeHMS:
|
||||||
hourPattern = &(fSymbols->fGmtHourFormats[DateFormatSymbols::GMT_NEGATIVE_HMS]);
|
hourPattern = &(fSymbols->fGmtHourFormats[DateFormatSymbols::GMT_NEGATIVE_HMS]);
|
||||||
|
@ -145,9 +145,11 @@ getTimeZoneTranslationType(TimeZoneTranslationTypeIndex typeIdx) {
|
|||||||
case ZSIDX_LONG_DAYLIGHT:
|
case ZSIDX_LONG_DAYLIGHT:
|
||||||
type = DAYLIGHT_LONG;
|
type = DAYLIGHT_LONG;
|
||||||
break;
|
break;
|
||||||
|
case ZSIDX_COUNT:
|
||||||
case ZSIDX_SHORT_DAYLIGHT:
|
case ZSIDX_SHORT_DAYLIGHT:
|
||||||
type = DAYLIGHT_SHORT;
|
type = DAYLIGHT_SHORT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
@ -213,6 +215,11 @@ CharacterNode::getChildNode(UChar32 c) const {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// Virtual destructor to avoid warning
|
||||||
|
TextTrieMapSearchResultHandler::~TextTrieMapSearchResultHandler(){
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
TextTrieMap::TextTrieMap(UBool ignoreCase)
|
TextTrieMap::TextTrieMap(UBool ignoreCase)
|
||||||
: fIgnoreCase(ignoreCase), fRoot(NULL) {
|
: fIgnoreCase(ignoreCase), fRoot(NULL) {
|
||||||
@ -1012,6 +1019,7 @@ ZoneStringFormat::getString(const UnicodeString &tzid, TimeZoneTranslationTypeIn
|
|||||||
break;
|
break;
|
||||||
case ZSIDX_SHORT_STANDARD:
|
case ZSIDX_SHORT_STANDARD:
|
||||||
case ZSIDX_SHORT_DAYLIGHT:
|
case ZSIDX_SHORT_DAYLIGHT:
|
||||||
|
case ZSIDX_COUNT: //added to avoid warning
|
||||||
case ZSIDX_SHORT_GENERIC:
|
case ZSIDX_SHORT_GENERIC:
|
||||||
if (!commonlyUsedOnly || zstrings->isShortFormatCommonlyUsed()) {
|
if (!commonlyUsedOnly || zstrings->isShortFormatCommonlyUsed()) {
|
||||||
zstrings->getString(typeIdx, result);
|
zstrings->getString(typeIdx, result);
|
||||||
@ -1036,6 +1044,7 @@ ZoneStringFormat::getString(const UnicodeString &tzid, TimeZoneTranslationTypeIn
|
|||||||
break;
|
break;
|
||||||
case ZSIDX_SHORT_STANDARD:
|
case ZSIDX_SHORT_STANDARD:
|
||||||
case ZSIDX_SHORT_DAYLIGHT:
|
case ZSIDX_SHORT_DAYLIGHT:
|
||||||
|
case ZSIDX_COUNT: //added to avoid warning
|
||||||
case ZSIDX_SHORT_GENERIC:
|
case ZSIDX_SHORT_GENERIC:
|
||||||
if (!commonlyUsedOnly || mzstrings->isShortFormatCommonlyUsed()) {
|
if (!commonlyUsedOnly || mzstrings->isShortFormatCommonlyUsed()) {
|
||||||
mzstrings->getString(typeIdx, result);
|
mzstrings->getString(typeIdx, result);
|
||||||
|
@ -59,6 +59,7 @@ class TextTrieMapSearchResultHandler : public UMemory {
|
|||||||
public:
|
public:
|
||||||
virtual UBool handleMatch(int32_t matchLength,
|
virtual UBool handleMatch(int32_t matchLength,
|
||||||
const UVector *values, UErrorCode& status) = 0;
|
const UVector *values, UErrorCode& status) = 0;
|
||||||
|
virtual ~TextTrieMapSearchResultHandler(); //added to avoid warning
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1224,7 +1224,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
|
|||||||
const UChar *lastAlias;
|
const UChar *lastAlias;
|
||||||
const UChar *orgAlias = fmt;
|
const UChar *orgAlias = fmt;
|
||||||
/* parsed argument list */
|
/* parsed argument list */
|
||||||
ufmt_args *arglist;
|
ufmt_args *arglist = NULL; //initialized it to avoid warning
|
||||||
UErrorCode status = U_ZERO_ERROR;
|
UErrorCode status = U_ZERO_ERROR;
|
||||||
if (!locStringContext || locStringContext->available >= 0) {
|
if (!locStringContext || locStringContext->available >= 0) {
|
||||||
/* get the parsed list of argument types */
|
/* get the parsed list of argument types */
|
||||||
|
@ -99,7 +99,6 @@ static void write_tabs(FileStream* os){
|
|||||||
|
|
||||||
static const char* enc ="";
|
static const char* enc ="";
|
||||||
static UConverter* conv = NULL;
|
static UConverter* conv = NULL;
|
||||||
static char NUMBER = ZERO;
|
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
uCharsToChars( char* target,int32_t targetLen, UChar* source, int32_t sourceLen,UErrorCode* status){
|
uCharsToChars( char* target,int32_t targetLen, UChar* source, int32_t sourceLen,UErrorCode* status){
|
||||||
|
@ -1414,7 +1414,7 @@ MBCSWrite(NewConverter *cnvData, const UConverterStaticData *staticData,
|
|||||||
if(mbcsData->omitFromU) {
|
if(mbcsData->omitFromU) {
|
||||||
/* find how much of stage2 can be omitted */
|
/* find how much of stage2 can be omitted */
|
||||||
int32_t utf8Limit=(int32_t)mbcsData->utf8Max+1;
|
int32_t utf8Limit=(int32_t)mbcsData->utf8Max+1;
|
||||||
uint32_t st2;
|
uint32_t st2=0; //initialized it to avoid warning
|
||||||
|
|
||||||
i=utf8Limit>>MBCS_STAGE_1_SHIFT;
|
i=utf8Limit>>MBCS_STAGE_1_SHIFT;
|
||||||
if((utf8Limit&((1<<MBCS_STAGE_1_SHIFT)-1))!=0 && (st2=mbcsData->stage1[i])!=0) {
|
if((utf8Limit&((1<<MBCS_STAGE_1_SHIFT)-1))!=0 && (st2=mbcsData->stage1[i])!=0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user