From a934d2c674097fd61800d1a6d1815ea7b95784dd Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Tue, 13 Jan 2004 19:54:06 +0000 Subject: [PATCH] ICU-3222 compiler warning fix X-SVN-Rev: 14312 --- icu4c/source/common/rbbi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index e3a98f313c..f59e77f9f5 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -1161,7 +1161,11 @@ int32_t RuleBasedBreakIterator::getRuleStatus() const { int32_t pa = current(); nonConstThis->previous(); int32_t pb = nonConstThis->next(); - U_ASSERT(pa == pb); + if (pa != pb) { + // note: the if (pa != pb) test is here only to eliminate warnings for + // unused local variables on gcc. Logically, it isn't needed. + U_ASSERT(pa == pb); + } } } return nonConstThis->fLastBreakTag;