ICU-45 clean up more g++ compiler warnings

X-SVN-Rev: 9314
This commit is contained in:
Andy Heninger 2002-07-24 19:07:37 +00:00
parent 09f9bc978e
commit 8714fcad68
11 changed files with 17 additions and 24 deletions

View file

@ -20,7 +20,7 @@ const char BreakDictionary::fgClassID=0;
// deserialization
//=================================================================================
BreakDictionary::BreakDictionary(const char* dictionaryFilename, UErrorCode& status)
BreakDictionary::BreakDictionary(const char* /*dictionaryFilename*/, UErrorCode& status)
{
if (U_FAILURE(status)) return;

View file

@ -128,7 +128,7 @@ BreakIterator::createLineInstance(const Locale& key, UErrorCode& status)
// Creates a simple text boundary for character breaks.
BreakIterator*
BreakIterator::createCharacterInstance(const Locale& key, UErrorCode& status)
BreakIterator::createCharacterInstance(const Locale& /* key */, UErrorCode& status)
{
// WARNING: This routine is currently written specifically to handle only the
// default rules files and the alternate rules files for Thai. This function
@ -156,7 +156,7 @@ BreakIterator::createCharacterInstance(const Locale& key, UErrorCode& status)
// Creates a simple text boundary for sentence breaks.
BreakIterator*
BreakIterator::createSentenceInstance(const Locale& key, UErrorCode& status)
BreakIterator::createSentenceInstance(const Locale& /*key */, UErrorCode& status)
{
// WARNING: This routine is currently written specifically to handle only the
// default rules files and the alternate rules files for Thai. This function
@ -184,7 +184,7 @@ BreakIterator::createSentenceInstance(const Locale& key, UErrorCode& status)
// Creates a simple text boundary for title casing breaks.
BreakIterator*
BreakIterator::createTitleInstance(const Locale& key, UErrorCode& status)
BreakIterator::createTitleInstance(const Locale& /* key */, UErrorCode& status)
{
// WARNING: This routine is currently written specifically to handle only the
// default rules files. This function will have to be made fully general

View file

@ -328,8 +328,8 @@ BreakIterator * DictionaryBasedBreakIterator::createBufferClone(void *stackBuff
// Check the alignment and size of the user supplied buffer.
// Allocate heap memory if the user supplied memory is insufficient.
//
char *buf = (char *)stackBuffer;
int32_t s = bufferSize;
char *buf = (char *)stackBuffer;
uint32_t s = bufferSize;
if (stackBuffer == NULL) {
s = 0; // Ignore size, force allocation if user didn't give us a buffer.

View file

@ -111,6 +111,7 @@ RuleBasedBreakIterator::RuleBasedBreakIterator() {
//
//-------------------------------------------------------------------------------
RuleBasedBreakIterator::RuleBasedBreakIterator(const RuleBasedBreakIterator& other)
: BreakIterator(other)
{
this->init();
*this = other;

View file

@ -184,7 +184,7 @@ const UnicodeString &RBBIDataWrapper::getRuleSourceString() {
void RBBIDataWrapper::printData() {
uint32_t c, s;
printf("RBBI Data at %p\n", fHeader);
printf("RBBI Data at %p\n", (void *)fHeader);
printf(" Version = %d\n", fHeader->fVersion);
printf(" total length of data = %d\n", fHeader->fLength);
printf(" number of character categories = %d\n\n", fHeader->fCatCount);

View file

@ -292,7 +292,7 @@ static const char *nodeTypeNames[] = {
void RBBINode::print() {
printf("%10p %12s %10p %10p %10p %4d %6d %d ",
this, nodeTypeNames[fType], fParent, fLeftChild, fRightChild,
(void *)this, nodeTypeNames[fType], (void *)fParent, (void *)fLeftChild, (void *)fRightChild,
fSerialNum, fFirstPos, fVal);
if (fType == varRef) {
printUnicodeString(fText);

View file

@ -38,13 +38,6 @@ U_NAMESPACE_BEGIN
const char RBBIRuleBuilder::fgClassID=0;
//----------------------------------------------------------------------------------------
//
// Forward Declarations.
//
//----------------------------------------------------------------------------------------
static void U_EXPORT2 U_CALLCONV RBBISetTable_deleter(void *p);
//----------------------------------------------------------------------------------------
//

View file

@ -195,8 +195,7 @@ RBBIRuleScanner::~RBBIRuleScanner() {
// definitions problems. I'm sure that there's a better way.
//
//----------------------------------------------------------------------------------------
UBool RBBIRuleScanner::doParseActions(EParseAction action,
RBBIRuleScanner::RBBIRuleChar &c)
UBool RBBIRuleScanner::doParseActions(EParseAction action)
{
RBBINode *n = NULL;
@ -455,7 +454,7 @@ UBool RBBIRuleScanner::doParseActions(EParseAction action,
{
n = fNodeStack[fNodeStackPtr];
uint32_t v = u_charDigitValue(fC.fChar);
U_ASSERT(v >= 0);
U_ASSERT(v < 10);
n->fVal = n->fVal*10 + v;
break;
}
@ -932,7 +931,7 @@ void RBBIRuleScanner::parse() {
// We've found the row of the state table that matches the current input
// character from the rules string.
// Perform any action specified by this row in the state table.
if (doParseActions((EParseAction)tableEl->fAction, fC) == FALSE) {
if (doParseActions((EParseAction)tableEl->fAction) == FALSE) {
// Break out of the state machine loop if the
// the action signalled some kind of error, or
// the action was to exit, occurs on normal end-of-rules-input.

View file

@ -89,7 +89,7 @@ public:
private:
UBool doParseActions(EParseAction a, RBBIRuleChar &c);
UBool doParseActions(EParseAction a);
void error(UErrorCode e); // error reporting convenience function.
void fixOpStack(RBBINode::OpPrecedence p);
// a character.

View file

@ -246,7 +246,7 @@ void RBBISymbolTable::print() const {
RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer;
RBBINode::printUnicodeString(s->key, 15);
printf(" %8p ", s->val);
printf(" %8p ", (void *)s->val);
RBBINode::printUnicodeString(s->val->fLeftChild->fText);
printf("\n");
}

View file

@ -492,13 +492,13 @@ public:
protected:
BreakIterator();
UBool fBufferClone;
BreakIterator (const BreakIterator &other) : UObject(other), fBufferClone(FALSE) {}
private:
/**
* The copy constructor and assignment operator have no real implementation.
* They are provided to make the compiler happy. Do not call.
* The assignment operator has no real implementation.
* It's provided to make the compiler happy. Do not call.
*/
BreakIterator& operator=(const BreakIterator&) { return *this; }
BreakIterator (const BreakIterator &other) : UObject(other) {}
};
inline UBool BreakIterator::isBufferClone()