From fd1e12bff8e60ab42063e743044d7a7969ce98d6 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Tue, 15 Jun 2004 22:54:48 +0000 Subject: [PATCH] ICU-3500 Fix some compiler warnings. X-SVN-Rev: 15884 --- icu4c/source/common/uloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icu4c/source/common/uloc.c b/icu4c/source/common/uloc.c index c9217f18258..51740142c23 100644 --- a/icu4c/source/common/uloc.c +++ b/icu4c/source/common/uloc.c @@ -1929,7 +1929,7 @@ _getStringOrCopyKey(const char *path, const char *locale, const char *substitute, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode) { - const UChar *s; + const UChar *s = NULL; int32_t length; if(itemKey==NULL) { @@ -1953,7 +1953,7 @@ _getStringOrCopyKey(const char *path, const char *locale, } if(U_SUCCESS(*pErrorCode)) { int32_t copyLength=uprv_min(length, destCapacity); - if(copyLength>0) { + if(copyLength>0 && s != NULL) { u_memcpy(dest, s, copyLength); } } else {