ICU-2000 Fix some compiler warnings
X-SVN-Rev: 10411
This commit is contained in:
parent
3a350fa020
commit
1341f3bcd1
@ -49,7 +49,7 @@ RuleBasedBreakIterator::fgClassID = 0;
|
||||
RuleBasedBreakIterator::RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode &status)
|
||||
{
|
||||
init();
|
||||
if (U_FAILURE(status)) {return;};
|
||||
if (U_FAILURE(status)) {return;}
|
||||
fData = new RBBIDataWrapper(data, status);
|
||||
if(fData == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
@ -66,7 +66,7 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode
|
||||
RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* udm, UErrorCode &status)
|
||||
{
|
||||
init();
|
||||
if (U_FAILURE(status)) {return;};
|
||||
if (U_FAILURE(status)) {return;}
|
||||
fData = new RBBIDataWrapper(udm, status);
|
||||
if(fData == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
@ -86,7 +86,7 @@ RuleBasedBreakIterator::RuleBasedBreakIterator( const UnicodeString &rules,
|
||||
UErrorCode &status)
|
||||
{
|
||||
init();
|
||||
if (U_FAILURE(status)) {return;};
|
||||
if (U_FAILURE(status)) {return;}
|
||||
RuleBasedBreakIterator *bi = (RuleBasedBreakIterator *)
|
||||
RBBIRuleBuilder::createRuleBasedBreakIterator(rules, parseError, status);
|
||||
// Note: This is a bit awkward. The RBBI ruleBuilder has a factory method that
|
||||
@ -284,7 +284,7 @@ RuleBasedBreakIterator::getText() const {
|
||||
if (nonConstThis->fText == NULL) {
|
||||
// TODO: do this in a way that does not do a default conversion!
|
||||
nonConstThis->fText = new StringCharacterIterator("");
|
||||
};
|
||||
}
|
||||
return *nonConstThis->fText;
|
||||
}
|
||||
|
||||
|
@ -145,8 +145,7 @@ UBool RBBIDataWrapper::operator ==(const RBBIDataWrapper &other) const {
|
||||
|
||||
int32_t RBBIDataWrapper::hashCode() {
|
||||
return fHeader->fFTableLen;
|
||||
;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -161,13 +160,13 @@ void RBBIDataWrapper::removeReference() {
|
||||
if (umtx_atomic_dec(&fRefCount) == 0) {
|
||||
delete this;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
RBBIDataWrapper *RBBIDataWrapper::addReference() {
|
||||
umtx_atomic_inc(&fRefCount);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -196,7 +195,7 @@ void RBBIDataWrapper::printData() {
|
||||
|
||||
RBBIDebugPrintf(" Forward State Transition Table\n");
|
||||
RBBIDebugPrintf("State | Acc LA Tag");
|
||||
for (c=0; c<fHeader->fCatCount; c++) {RBBIDebugPrintf("%3d ", c);};
|
||||
for (c=0; c<fHeader->fCatCount; c++) {RBBIDebugPrintf("%3d ", c);}
|
||||
RBBIDebugPrintf("\n------|---------------"); for (c=0;c<fHeader->fCatCount; c++) {RBBIDebugPrintf("----");}
|
||||
RBBIDebugPrintf("\n");
|
||||
|
||||
@ -206,7 +205,7 @@ void RBBIDataWrapper::printData() {
|
||||
RBBIDebugPrintf("%4d | %3d %3d %3d ", s, row->fAccepting, row->fLookAhead, row->fTag);
|
||||
for (c=0; c<fHeader->fCatCount; c++) {
|
||||
RBBIDebugPrintf("%3d ", row->fNextState[c]);
|
||||
};
|
||||
}
|
||||
RBBIDebugPrintf("\n");
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ RBBINode::RBBINode(NodeType t) : UMemory() {
|
||||
else if (t==opStart) {fPrecedence = precStart;}
|
||||
else if (t==opLParen) {fPrecedence = precLParen;}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
|
||||
@ -85,7 +85,7 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
|
||||
fFirstPosSet = new UVector(status); // TODO - get a real status from somewhere
|
||||
fLastPosSet = new UVector(status);
|
||||
fFollowPos = new UVector(status);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
@ -154,7 +154,7 @@ RBBINode *RBBINode::cloneTree() {
|
||||
}
|
||||
}
|
||||
return n;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -105,7 +105,8 @@ RBBIRuleBuilder::~RBBIRuleBuilder() {
|
||||
// which is also the format needed by the RBBI runtime engine.
|
||||
//
|
||||
//----------------------------------------------------------------------------------------
|
||||
static int32_t align8(int32_t i) {return (i+7) & 0xfffffff8;};
|
||||
static int32_t align8(int32_t i) {return (i+7) & 0xfffffff8;}
|
||||
|
||||
RBBIDataHeader *RBBIRuleBuilder::flattenData() {
|
||||
if (U_FAILURE(*fStatus)) {
|
||||
return NULL;
|
||||
|
@ -78,7 +78,7 @@ static void U_EXPORT2 U_CALLCONV RBBISetTable_deleter(void *p) {
|
||||
// Note: px->val is owned by the linked list "fSetsListHead" in scanner.
|
||||
// Don't delete the value nodes here.
|
||||
uprv_free(px);
|
||||
};
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
|
||||
@ -462,7 +462,9 @@ UBool RBBIRuleScanner::doParseActions(EParseAction action)
|
||||
|
||||
case doStartVariableName:
|
||||
n = pushNewNode(RBBINode::varRef);
|
||||
if (U_FAILURE(*fRB->fStatus)) {break;};
|
||||
if (U_FAILURE(*fRB->fStatus)) {
|
||||
break;
|
||||
}
|
||||
n->fFirstPos = fScanIndex;
|
||||
break;
|
||||
|
||||
@ -511,7 +513,7 @@ UBool RBBIRuleScanner::doParseActions(EParseAction action)
|
||||
break;
|
||||
}
|
||||
return returnVal;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -988,7 +990,7 @@ void RBBIRuleScanner::parse() {
|
||||
void RBBIRuleScanner::printNodeStack(const char *title) {
|
||||
int i;
|
||||
RBBIDebugPrintf("%s. Dumping node stack...\n", title);
|
||||
for (i=fNodeStackPtr; i>0; i--) {fNodeStack[i]->printTree();};
|
||||
for (i=fNodeStackPtr; i>0; i--) {fNodeStack[i]->printTree();}
|
||||
}
|
||||
|
||||
|
||||
@ -1013,7 +1015,7 @@ RBBINode *RBBIRuleScanner::pushNewNode(RBBINode::NodeType t) {
|
||||
*fRB->fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
return fNodeStack[fNodeStackPtr];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1082,7 +1084,7 @@ void RBBIRuleScanner::scanSet() {
|
||||
findSetFor(n->fText, n, uset);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
@ -382,7 +382,7 @@ void RBBISetBuilder::printRangeGroups() {
|
||||
lastPrintedGroupNum = groupNum;
|
||||
RBBIDebugPrintf("%2i ", groupNum);
|
||||
|
||||
if (rlRange->fNum & 0x4000) { RBBIDebugPrintf(" <DICT> ");};
|
||||
if (rlRange->fNum & 0x4000) { RBBIDebugPrintf(" <DICT> ");}
|
||||
|
||||
for (i=0; i<rlRange->fIncludesSets->size(); i++) {
|
||||
RBBINode *usetNode = (RBBINode *)rlRange->fIncludesSets->elementAt(i);
|
||||
|
@ -31,7 +31,7 @@ U_CDECL_BEGIN
|
||||
static void U_EXPORT2 U_CALLCONV RBBISymbolTableEntry_deleter(void *p) {
|
||||
RBBISymbolTableEntry *px = (RBBISymbolTableEntry *)p;
|
||||
delete px;
|
||||
};
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
|
||||
@ -49,14 +49,14 @@ RBBISymbolTable::RBBISymbolTable(RBBIRuleScanner *rs, const UnicodeString &rules
|
||||
|
||||
fHashTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, &status);
|
||||
uhash_setValueDeleter(fHashTable, RBBISymbolTableEntry_deleter);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
RBBISymbolTable::~RBBISymbolTable()
|
||||
{
|
||||
uhash_close(fHashTable);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
@ -98,7 +98,7 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const
|
||||
This->fCachedSetLookup = NULL;
|
||||
}
|
||||
return retString;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ const UnicodeFunctor *RBBISymbolTable::lookupMatcher(UChar32 ch) const
|
||||
This->fCachedSetLookup = 0;
|
||||
}
|
||||
return retVal;
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
// RBBISymbolTable::parseReference This function from the abstract symbol table interface
|
||||
@ -172,7 +172,7 @@ RBBINode *RBBISymbolTable::lookupNode(const UnicodeString &key) const{
|
||||
retNode = el->val;
|
||||
}
|
||||
return retNode;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
@ -197,11 +197,11 @@ void RBBISymbolTable::addEntry (const UnicodeString &key, RBBINode *
|
||||
if (e == NULL) {
|
||||
err = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
};
|
||||
}
|
||||
e->key = key;
|
||||
e->val = val;
|
||||
uhash_put( fHashTable, &e->key, e, &err);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
RBBISymbolTableEntry::RBBISymbolTableEntry() : UMemory(), key(), val(NULL) {}
|
||||
@ -217,7 +217,7 @@ RBBISymbolTableEntry::~RBBISymbolTableEntry() {
|
||||
delete val;
|
||||
|
||||
// Note: the key UnicodeString is destructed by virtue of being in the object by value.
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
@ -256,13 +256,13 @@ U_CAPI UBool U_EXPORT2
|
||||
ubrk_isBoundary(UBreakIterator *bi, int32_t offset)
|
||||
{
|
||||
return ((BreakIterator *)bi)->isBoundary(offset);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
ubrk_getRuleStatus(UBreakIterator *bi)
|
||||
{
|
||||
return ((RuleBasedBreakIterator *)bi)->getRuleStatus();
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
|
||||
|
@ -231,7 +231,7 @@ ucnv_copyPlatformString(char *platformString, UConverterPlatform pltfrm)
|
||||
return 4;
|
||||
case UCNV_UNKNOWN:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
/* default to empty string */
|
||||
*platformString = 0;
|
||||
|
@ -275,7 +275,7 @@ haveAliasData(UErrorCode *pErrorCode) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
U_INLINE static UBool
|
||||
static U_INLINE UBool
|
||||
isAlias(const char *alias, UErrorCode *pErrorCode) {
|
||||
if(alias==NULL) {
|
||||
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
@ -1103,7 +1103,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
|
||||
if (!(isICUData && pCommonData && extendICUData(pCommonData, &errorCode))) {
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* data not found */
|
||||
if(U_SUCCESS(*pErrorCode)) {
|
||||
|
@ -97,7 +97,7 @@ class U_COMMON_API UnicodeFunctor : public UObject {
|
||||
* class have the same class ID. Objects of other classes have
|
||||
* different class IDs.
|
||||
*/
|
||||
virtual UClassID getDynamicClassID(void) const { return getStaticClassID(); };
|
||||
virtual UClassID getDynamicClassID(void) const { return getStaticClassID(); }
|
||||
|
||||
/**
|
||||
* Set the data object associated with this functor. The data
|
||||
|
@ -1012,7 +1012,7 @@ public:
|
||||
* class have the same class ID. Objects of other classes have
|
||||
* different class IDs.
|
||||
*/
|
||||
virtual UClassID getDynamicClassID(void) const { return getStaticClassID(); };
|
||||
virtual UClassID getDynamicClassID(void) const { return getStaticClassID(); }
|
||||
|
||||
private:
|
||||
|
||||
|
@ -229,7 +229,7 @@ u_hasBinaryProperty(UChar32 c, UProperty which) {
|
||||
default:
|
||||
/* not a known binary property */
|
||||
return FALSE;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
U_CAPI UBool U_EXPORT2
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "ustr_imp.h"
|
||||
|
||||
|
||||
U_INLINE static UBool
|
||||
static U_INLINE UBool
|
||||
u_growAnyBufferFromStatic(void *context,
|
||||
void **pBuffer, int32_t *pCapacity, int32_t reqCapacity,
|
||||
int32_t length, int32_t size) {
|
||||
@ -292,7 +292,7 @@ u_strFromUTF8(UChar *dest,
|
||||
return dest;
|
||||
}
|
||||
|
||||
U_INLINE static uint8_t *
|
||||
static U_INLINE uint8_t *
|
||||
_appendUTF8(uint8_t *pDest, UChar32 c) {
|
||||
/* c<=0x7f is handled by the caller, here it is 0x80<=c<=0x10ffff */
|
||||
if((c)<=0x7ff) {
|
||||
|
Loading…
Reference in New Issue
Block a user