From 248545dcc7694c85591180955a16f7011898f60b Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Mon, 7 Aug 2006 18:02:31 +0000 Subject: [PATCH] ICU-4707 Fix some compiler warnings. X-SVN-Rev: 19995 --- icu4c/source/common/unicode/unistr.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index 4793e62fef..1c56e2e102 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -4077,12 +4077,14 @@ inline UnicodeString& UnicodeString::remove(int32_t start, int32_t _length) { - if(start <= 0 && _length == INT32_MAX) { - // remove(guaranteed everything) of a bogus string makes the string empty and non-bogus - return remove(); - } else { - return doReplace(start, _length, NULL, 0, 0); - } + UnicodeString& result; + if(start <= 0 && _length == INT32_MAX) { + // remove(guaranteed everything) of a bogus string makes the string empty and non-bogus + result = remove(); + } else { + result = doReplace(start, _length, NULL, 0, 0); + } + return result; } inline UnicodeString&