Index: source/common/ustring.cpp |
diff --git a/source/common/ustring.cpp b/source/common/ustring.cpp |
index 40d23c06aea74d1eda5e9fd605181840f500031c..aae7f5c36d300d209a80b2fb800aa78cf1723061 100644 |
--- a/source/common/ustring.cpp |
+++ b/source/common/ustring.cpp |
@@ -1,7 +1,9 @@ |
+// Copyright (C) 2016 and later: Unicode, Inc. and others. |
+// License & terms of use: http://www.unicode.org/copyright.html |
/* |
****************************************************************************** |
* |
-* Copyright (C) 1998-2014, International Business Machines |
+* Copyright (C) 1998-2016, International Business Machines |
* Corporation and others. All Rights Reserved. |
* |
****************************************************************************** |
@@ -991,7 +993,7 @@ U_CAPI int32_t U_EXPORT2 |
u_strlen(const UChar *s) |
{ |
#if U_SIZEOF_WCHAR_T == U_SIZEOF_UCHAR |
- return (int32_t)uprv_wcslen(s); |
+ return (int32_t)uprv_wcslen((const wchar_t *)s); |
#else |
const UChar *t = s; |
while(*t != 0) { |
@@ -1113,7 +1115,7 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) { |
U_CAPI UChar * U_EXPORT2 |
u_memcpy(UChar *dest, const UChar *src, int32_t count) { |
if(count > 0) { |
- uprv_memcpy(dest, src, count*U_SIZEOF_UCHAR); |
+ uprv_memcpy(dest, src, (size_t)count*U_SIZEOF_UCHAR); |
} |
return dest; |
} |
@@ -1121,7 +1123,7 @@ u_memcpy(UChar *dest, const UChar *src, int32_t count) { |
U_CAPI UChar * U_EXPORT2 |
u_memmove(UChar *dest, const UChar *src, int32_t count) { |
if(count > 0) { |
- uprv_memmove(dest, src, count*U_SIZEOF_UCHAR); |
+ uprv_memmove(dest, src, (size_t)count*U_SIZEOF_UCHAR); |
} |
return dest; |
} |
@@ -1179,7 +1181,7 @@ static const UChar UNESCAPE_MAP[] = { |
/*t*/ 0x74, 0x09, |
/*v*/ 0x76, 0x0b |
}; |
-enum { UNESCAPE_MAP_LENGTH = sizeof(UNESCAPE_MAP) / sizeof(UNESCAPE_MAP[0]) }; |
+enum { UNESCAPE_MAP_LENGTH = UPRV_LENGTHOF(UNESCAPE_MAP) }; |
/* Convert one octal digit to a numeric value 0..7, or -1 on failure */ |
static int8_t _digit8(UChar c) { |