diff options
author | Werner Koch <wk@gnupg.org> | 2019-11-27 20:28:09 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-11-27 20:28:09 +0100 |
commit | 16d3ffa15906037863110f4157ab84e13f579752 (patch) | |
tree | 511aa8d2c5e5d1be25c538d3079f445f4181c932 | |
parent | 2fc0761aedffe661c030b3f1f73e268ca66d34a4 (diff) | |
download | libassuan-16d3ffa15906037863110f4157ab84e13f579752.tar.gz |
w32: Fix bad-function-cast warning.
* src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Avoid compiler warning.
--
The actual warning was:
warning: cast from function call of type 'intptr_t' {aka 'int'} to
non-matching type 'void *' [-Wbad-function-cast]
return (assuan_fd_t)(HANDLE) _get_osfhandle (fd);
Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r-- | src/w32-fd-t.inc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/w32-fd-t.inc.h b/src/w32-fd-t.inc.h index ca63671..bc3df28 100644 --- a/src/w32-fd-t.inc.h +++ b/src/w32-fd-t.inc.h @@ -28,6 +28,10 @@ typedef void *assuan_fd_t; #define ASSUAN_INVALID_FD ((void*)(-1)) #define ASSUAN_INVALID_PID ((pid_t) -1) +#if GPGRT_HAVE_PRAGMA_GCC_PUSH +# pragma GCC push_options +# pragma GCC diagnostic ignored "-Wbad-function-cast" +#endif static GPG_ERR_INLINE assuan_fd_t assuan_fd_from_posix_fd (int fd) { @@ -36,5 +40,8 @@ assuan_fd_from_posix_fd (int fd) else return (assuan_fd_t) _get_osfhandle (fd); } +#if GPGRT_HAVE_PRAGMA_GCC_PUSH +# pragma GCC pop_options +#endif ##EOF## |