diff options
author | Brad King <brad.king@kitware.com> | 2015-01-10 17:09:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-10 17:09:04 (GMT) |
commit | e5b914209742a70c72c6cf8a8e6e1e005d8830f2 (patch) | |
tree | 3e82e13ca173bf5903d4c1235278cf6f1496a83c /Source/kwsys/EncodingC.c | |
parent | 4aa9c64511adb6e3aa1b686d07f8cbdf92dedbab (diff) | |
parent | 54d83caecfc1e0b8f047037ea6aaa7d54b64d8b3 (diff) | |
download | CMake-e5b914209742a70c72c6cf8a8e6e1e005d8830f2.zip CMake-e5b914209742a70c72c6cf8a8e6e1e005d8830f2.tar.gz CMake-e5b914209742a70c72c6cf8a8e6e1e005d8830f2.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/EncodingC.c')
-rw-r--r-- | Source/kwsys/EncodingC.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/kwsys/EncodingC.c b/Source/kwsys/EncodingC.c index cda78e2..ba2cec2 100644 --- a/Source/kwsys/EncodingC.c +++ b/Source/kwsys/EncodingC.c @@ -44,7 +44,7 @@ wchar_t* kwsysEncoding_DupToWide(const char* str) size_t length = kwsysEncoding_mbstowcs(NULL, str, 0) + 1; if(length > 0) { - ret = malloc((length)*sizeof(wchar_t)); + ret = (wchar_t*)malloc((length)*sizeof(wchar_t)); ret[0] = 0; kwsysEncoding_mbstowcs(ret, str, length); } @@ -71,7 +71,7 @@ char* kwsysEncoding_DupToNarrow(const wchar_t* str) size_t length = kwsysEncoding_wcstombs(0, str, 0) + 1; if(length > 0) { - ret = malloc(length); + ret = (char*)malloc(length); ret[0] = 0; kwsysEncoding_wcstombs(ret, str, length); } |