summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2019-01-23 22:59:48 -0800
committerJames Zern <jzern@google.com>2019-01-25 01:33:20 -0800
commitfa58371c6ada816331c429fc38675c14bcf76fb0 (patch)
tree45f76a3762bb06a201f94e135f06f7e8e299f2e7
parent84fdd0d12ea5a54a4580cb3cc7e8ea6e10062efe (diff)
downloadlibwebp-fa58371c6ada816331c429fc38675c14bcf76fb0.tar.gz
unicode,INIT_WARGV: add missing cast
CommandLineToArgvW() returns a LPWSTR*, storing to const LPWSTR* is incorrect without a cast; fixes gcc -Wincompatible-pointer-types and clang(-cl) -Wincompatible-pointer-types-discads-qualifiers warnings Change-Id: Iad5b49c4862c7be68251272e50d3c751099559bc (cherry picked from commit 2b7214ab994a9c6f473b5c97c9ad3868d7cb5c90)
-rw-r--r--examples/unicode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/unicode.h b/examples/unicode.h
index b7c7fbb5..61199ce7 100644
--- a/examples/unicode.h
+++ b/examples/unicode.h
@@ -28,7 +28,8 @@
// Create a wchar_t array containing Unicode parameters.
#define INIT_WARGV(ARGC, ARGV) \
int wargc; \
- const W_CHAR** const wargv = CommandLineToArgvW(GetCommandLineW(), &wargc); \
+ const W_CHAR** const wargv = \
+ (const W_CHAR**)CommandLineToArgvW(GetCommandLineW(), &wargc); \
do { \
if (wargv == NULL || wargc != (ARGC)) { \
fprintf(stderr, "Error: Unable to get Unicode arguments.\n"); \