diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2018-06-28 15:34:46 -0700 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2018-06-28 15:38:30 -0700 |
commit | f6895bb62c56261dd8e49d51f84269e9e9d6f21a (patch) | |
tree | cefbd40fe7792c2cbdca9199b0b51a9de96ad369 | |
parent | 092cd6e82d47919d2bbc13e132493d079470a429 (diff) | |
download | mingw-f6895bb62c56261dd8e49d51f84269e9e9d6f21a.tar.gz |
headers: Add casts in ua_wcs*chr in stralign.h
When building libcxx, a version of wcschr that returns const
is provided, breaking compilation here since the return from
wcschr is returned directly as if it were a const pointer.
By adding these casts, compilation succeeds.
This matches the calls to uaw_wcschr and uaw_wcsrchr directly
below, having similar casts.
Signed-off-by: Martin Storsjö <martin@...>
Signed-off-by: Mateusz Mikuła <mati865@...>
Upstream URL:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/1bd66b53be1b4da7e6679d01d2626c1d9bdc989f/
Change-Id: Ie8bc1cca20519a59fef01dec57f6b4f2aa3078ce
-rw-r--r-- | mingw-w64-v5.0.0/mingw-w64-headers/include/stralign.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mingw-w64-v5.0.0/mingw-w64-headers/include/stralign.h b/mingw-w64-v5.0.0/mingw-w64-headers/include/stralign.h index 9b5637d..f4d9d6d 100644 --- a/mingw-w64-v5.0.0/mingw-w64-headers/include/stralign.h +++ b/mingw-w64-v5.0.0/mingw-w64-headers/include/stralign.h @@ -118,11 +118,11 @@ extern "C" { #ifndef __CRT__NO_INLINE __CRT_INLINE PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) { - if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character); + if(WSTR_ALIGNED(String)) return (PUWSTR_C)wcschr((PCWSTR)String,Character); return (PUWSTR_C)uaw_wcschr(String,Character); } __CRT_INLINE PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) { - if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character); + if(WSTR_ALIGNED(String)) return (PUWSTR_C)wcsrchr((PCWSTR)String,Character); return (PUWSTR_C)uaw_wcsrchr(String,Character); } #if defined(__cplusplus) && defined(_WConst_Return) |