ICU-535 fixed some compiler warnings
X-SVN-Rev: 2336
This commit is contained in:
parent
2b967e3e7c
commit
6faae650dc
@ -43,6 +43,9 @@ u_normalize(const UChar* source,
|
||||
case UCOL_DECOMP_COMPAT_COMP_CAN:
|
||||
normMode = Normalizer::COMPOSE_COMPAT;
|
||||
break;
|
||||
default:
|
||||
*status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int32_t len = (sourceLength == -1 ? u_strlen(source) : sourceLength);
|
||||
@ -104,6 +107,9 @@ ucol_openRules( const UChar *rules,
|
||||
case UCOL_DECOMP_COMPAT_COMP_CAN:
|
||||
normMode = Normalizer::COMPOSE_COMPAT;
|
||||
break;
|
||||
default:
|
||||
*status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
RuleBasedCollator *col = 0;
|
||||
@ -201,8 +207,6 @@ ucol_getNormalization(const UCollator* coll)
|
||||
case Normalizer::DECOMP_COMPAT:
|
||||
return UCOL_DECOMP_COMPAT;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return UCOL_NO_NORMALIZATION;
|
||||
}
|
||||
@ -228,6 +232,10 @@ ucol_setNormalization( UCollator *coll,
|
||||
case UCOL_DECOMP_CAN_COMP_COMPAT:
|
||||
normMode = Normalizer::COMPOSE_COMPAT;
|
||||
break;
|
||||
default:
|
||||
/* Shouldn't get here. */
|
||||
/* *status = U_ILLEGAL_ARGUMENT_ERROR; */
|
||||
return;
|
||||
}
|
||||
|
||||
((Collator*)coll)->setDecomposition(normMode);
|
||||
|
@ -445,8 +445,8 @@ private:
|
||||
* The copy constructor and assignment operator have no real implementation.
|
||||
* They are provided to make the compiler happy. Do not call.
|
||||
*/
|
||||
BreakIterator& operator=(const BreakIterator& other) { return *this; }
|
||||
BreakIterator (const BreakIterator& other) {}
|
||||
BreakIterator& operator=(const BreakIterator&) { return *this; }
|
||||
BreakIterator (const BreakIterator&) {}
|
||||
};
|
||||
|
||||
#endif // _BRKITER
|
||||
|
@ -215,7 +215,7 @@ main(int argc, const char *argv[]) {
|
||||
}
|
||||
|
||||
/* determine the length of tables for the data offset of the strings */
|
||||
tagOffset = 2 + 4 * aliasCount + 2 + 4 * converterCount;
|
||||
tagOffset = (uint16_t)(2 + 4 * aliasCount + 2 + 4 * converterCount);
|
||||
stringOffset = (uint16_t)(tagOffset + 2 + (2 * tagCount) * converterCount + tagBlock.top);
|
||||
|
||||
/* write the table of aliases */
|
||||
@ -289,7 +289,7 @@ parseLine(const char *line) {
|
||||
limit=pos;
|
||||
|
||||
/* store the converter name */
|
||||
length=limit-start;
|
||||
length=(uint16_t)(limit-start);
|
||||
converter=allocString(&stringBlock, length+1);
|
||||
uprv_memcpy(converter, line+start, length);
|
||||
converter[length]=0;
|
||||
@ -356,7 +356,7 @@ parseLine(const char *line) {
|
||||
limit=pos;
|
||||
|
||||
/* store the alias name */
|
||||
length=limit-start;
|
||||
length=(uint16_t)(limit-start);
|
||||
alias=allocString(&stringBlock, length+1);
|
||||
uprv_memcpy(alias, line+start, length);
|
||||
alias[length]=0;
|
||||
@ -433,7 +433,8 @@ getTagNumber(const char *tag, uint16_t tagLen) {
|
||||
|
||||
/* add the tag to the tag table */
|
||||
tags[tagCount].tag = atag;
|
||||
uprv_memset(&tags[tagCount].aliases, 0, sizeof(tags[tagCount].aliases));
|
||||
/* Set the array of pointers to NULL */
|
||||
uprv_memset((void *)&tags[tagCount].aliases, 0, sizeof(tags[tagCount].aliases));
|
||||
|
||||
return tagCount++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user