]> granicus.if.org Git - icu/commitdiff
ICU-13346 avoid unused-variable compiler warning
authorMarkus Scherer <markus.icu@gmail.com>
Thu, 7 Sep 2017 19:50:40 +0000 (19:50 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Thu, 7 Sep 2017 19:50:40 +0000 (19:50 +0000)
X-SVN-Rev: 40374

icu4c/source/common/edits.cpp

index 09658958351cb616472aaad65c9bbcc0e297182f..c94fa57b4b5297d3fd4d8bc807edb581122250ea 100644 (file)
@@ -662,7 +662,8 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro
             // Search backwards.
             for (;;) {
                 UBool hasPrevious = previous(errorCode);
-                U_ASSERT(hasPrevious);  // because i>=0 and the first span starts there
+                U_ASSERT(hasPrevious);  // because i>=0 and the first span starts at 0
+                (void)hasPrevious;  // avoid unused-variable warning
                 spanStart = findSource ? srcIndex : destIndex;
                 if (i >= spanStart) {
                     // The index is in the current span.