Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix gcc8 warning on Windows #2979

Closed
wants to merge 1 commit into from

Conversation

@vszakats
Copy link
Member

commented Sep 11, 2018

No description provided.

@jay

This comment has been minimized.

Copy link
Member

commented Sep 12, 2018

The existing code looks correct. What's warning do you see?

@vszakats

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2018

@jay:

i686-w64-mingw32-gcc -I. -I../include -I"../../nghttp2/pkg/usr/local/include" -I"../../libssh2/include" -I"../../libssh2/win32" -I"../../openssl/include" -I"../../zlib/pkg/usr/local" -I"../../brotli/pkg/usr/local/include" -DCURL_STATICLIB -fno-ident -DCURL_DISABLE_SSL_AUTO_LOAD_CONFIG -fno-asynchronous-unwind-tables -DNGHTTP2_STATICLIB -g -O2 -Wall -W -fno-strict-aliasing -m32 -DBUILDING_LIBCURL -DCURL_WITH_MULTI_SSL -DUSE_NGHTTP2 -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP -DUSE_SCHANNEL -DHAVE_LIBZ -DHAVE_ZLIB_H -DHAVE_BROTLI -DUSE_WIN32_IDN -DWANT_IDN_PROTOTYPES -DUSE_WINDOWS_SSPI -DENABLE_IPV6 -D_WIN32_WINNT=0x0501 -DHAVE_LDAP_SSL -c curl_sspi.c -o curl_sspi.o
curl_sspi.c: In function 'Curl_sspi_global_init':
curl_sspi.c:93:30: warning: cast between incompatible function types from 'FARPROC' to 'struct _SECURITY_FUNCTION_TABLE_A * (__attribute__((stdcall)) *)(void)' [-Wcast-function-type]
     pInitSecurityInterface = (INITSECURITYINTERFACE_FN)
                              ^

Code is correct, but gcc 8 complains about casting function pointers for this case — a typical one for most Windows code. Other instances of the same case were suppressed earlier, and to make it easier, the CURLX_FUNCTION_CAST() macro was also added.

@jay

This comment has been minimized.

Copy link
Member

commented Sep 12, 2018

Ok

@vszakats vszakats closed this in 539a805 Sep 12, 2018

@vszakats vszakats deleted the vszakats:gcc8win branch Sep 12, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Dec 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.