ICU-3500 Fix some compiler warnings.

X-SVN-Rev: 15884
This commit is contained in:
George Rhoten 2004-06-15 22:54:48 +00:00
parent c59373cb93
commit fd1e12bff8

View File

@ -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 {