ICU-5016 fix compiler warnings & error in previous()

X-SVN-Rev: 19014
This commit is contained in:
Andy Heninger 2006-01-21 07:00:54 +00:00
parent 012aeaf012
commit 78a379d0ed
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1997-2005, International Business Machines Corporation and *
* Copyright (C) 1997-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
@ -74,8 +74,8 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UBool dict, UE
brkName = ures_getByKeyWithFallback(brkRules, type, brkName, &status);
// Get the actual string
brkfname = ures_getString(brkName, &size, &status);
U_ASSERT(size<sizeof(fnbuff));
if (size>=sizeof(fnbuff)) {
U_ASSERT((size_t)size<sizeof(fnbuff));
if ((size_t)size>=sizeof(fnbuff)) {
size=0;
if (U_SUCCESS(status)) {
status = U_BUFFER_OVERFLOW_ERROR;

View File

@ -1,6 +1,6 @@
/*
***************************************************************************
* Copyright (C) 1999-2005 International Business Machines Corporation *
* Copyright (C) 1999-2006 International Business Machines Corporation *
* and others. All rights reserved. *
***************************************************************************
*/
@ -420,7 +420,7 @@ int32_t RuleBasedBreakIterator::previous(void) {
fText->previous32();
int32_t lastResult = handlePrevious(fData->fReverseTable);
if (lastResult = UBRK_DONE) {
if (lastResult == UBRK_DONE) {
lastResult = fText->startIndex();
fText->setIndex(lastResult);
}