ICU-2699 Fix some compiler warnings.

X-SVN-Rev: 11416
This commit is contained in:
George Rhoten 2003-03-28 19:50:38 +00:00
parent ec4d8815ec
commit c929a0ab89
2 changed files with 35 additions and 20 deletions

View file

@ -263,26 +263,27 @@ void RBBINode::findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &s
// print. Print out a single node, for debugging.
//
//-------------------------------------------------------------------------
static const char * const nodeTypeNames[] = {
"setRef",
"uset",
"varRef",
"leafChar",
"lookAhead",
"tag",
"endMark",
"opStart",
"opCat",
"opOr",
"opStar",
"opPlus",
"opQuestion",
"opBreak",
"opReverse",
"opLParen"
};
void RBBINode::print() {
#ifdef RBBI_DEBUG
static const char * const nodeTypeNames[] = {
"setRef",
"uset",
"varRef",
"leafChar",
"lookAhead",
"tag",
"endMark",
"opStart",
"opCat",
"opOr",
"opStar",
"opPlus",
"opQuestion",
"opBreak",
"opReverse",
"opLParen"
};
RBBIDebugPrintf("%10p %12s %10p %10p %10p %4d %6d %d ",
(void *)this, nodeTypeNames[fType], (void *)fParent, (void *)fLeftChild, (void *)fRightChild,
fSerialNum, fFirstPos, fVal);
@ -290,9 +291,13 @@ void RBBINode::print() {
printUnicodeString(fText);
}
RBBIDebugPrintf("\n");
#endif
}
#ifdef RBBI_DEBUG
void RBBINode::printUnicodeString(const UnicodeString &, int) {}
#else
void RBBINode::printUnicodeString(const UnicodeString &s, int minWidth)
{
int i;
@ -304,6 +309,7 @@ void RBBINode::printUnicodeString(const UnicodeString &s, int minWidth)
RBBIDebugPrintf(" ");
}
}
#endif
//-------------------------------------------------------------------------
@ -311,6 +317,9 @@ void RBBINode::printUnicodeString(const UnicodeString &s, int minWidth)
// print. Print out the tree of nodes rooted at "this"
//
//-------------------------------------------------------------------------
#ifdef RBBI_DEBUG
void RBBINode::printTree(UBool, UBool) {}
#else
void RBBINode::printTree(UBool printHeading, UBool doVars) {
if (printHeading) {
RBBIDebugPrintf( "-------------------------------------------------------------------\n"
@ -330,6 +339,7 @@ void RBBINode::printTree(UBool printHeading, UBool doVars) {
}
}
}
#endif

View file

@ -568,6 +568,7 @@ UBool RBBITableBuilder::setEquals(UVector *a, UVector *b) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::printPosSets(RBBINode *n) {
#ifdef RBBI_DEBUG
if (n==NULL) {
return;
}
@ -585,6 +586,7 @@ void RBBITableBuilder::printPosSets(RBBINode *n) {
printPosSets(n->fLeftChild);
printPosSets(n->fRightChild);
#endif
}
@ -668,12 +670,14 @@ void RBBITableBuilder::exportTable(void *where) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::printSet(UVector *s) {
#ifdef RBBI_DEBUG
int32_t i;
for (i=0; i<s->size(); i++) {
void *v = s->elementAt(i);
RBBIDebugPrintf("%10p", v);
}
RBBIDebugPrintf("\n");
#endif
}
@ -683,7 +687,7 @@ void RBBITableBuilder::printSet(UVector *s) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::printStates() {
#ifdef RBBI_DEBUG
int c; // input "character"
int n; // state number
@ -705,6 +709,7 @@ void RBBITableBuilder::printStates() {
RBBIDebugPrintf("\n");
}
RBBIDebugPrintf("\n\n");
#endif
}