mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:23:58 +03:00
Silence GCC 8 cast-function-type warnings
On Windows, casting between unrelated function types is fine and sometimes even necessary, so just use an intermediate cast to (void (*) (void)) to silence the warning as described in [0]. [0] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html Closes https://github.com/curl/curl/pull/2860
This commit is contained in:
parent
2a278fd735
commit
25d2a1bae7
4 changed files with 13 additions and 3 deletions
|
|
@ -26,6 +26,9 @@
|
|||
#include <curl/curl.h> /* for curl_socket_t */
|
||||
#endif
|
||||
|
||||
#define CURLX_FUNCTION_CAST(target_type, func) \
|
||||
(target_type)(void (*) (void))(func)
|
||||
|
||||
unsigned short curlx_ultous(unsigned long ulnum);
|
||||
|
||||
unsigned char curlx_ultouc(unsigned long ulnum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue