diff options
author | James Zern <jzern@google.com> | 2019-01-23 22:59:48 -0800 |
---|---|---|
committer | James Zern <jzern@google.com> | 2019-01-24 07:08:55 +0000 |
commit | 2b7214ab994a9c6f473b5c97c9ad3868d7cb5c90 (patch) | |
tree | 91972195e27b0fc91c6efb2ed5c325832cb9b312 | |
parent | bf424b46a3d60e671678a092e728a9bb1ddf3f80 (diff) | |
download | libwebp-2b7214ab994a9c6f473b5c97c9ad3868d7cb5c90.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
-rw-r--r-- | examples/unicode.h | 3 |
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"); \ |