]> git.ipfire.org Git - thirdparty/make.git/commit
Fix GCC compile warning for "bad-function-cast" on Windows
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Fri, 9 Jun 2023 19:00:32 +0000 (21:00 +0200)
committerPaul Smith <psmith@gnu.org>
Tue, 4 Jul 2023 18:26:58 +0000 (14:26 -0400)
commit10003747596b4e03df0fbce760c0e560cf80a3ca
treea1a58962a9ced3be146bfa4521e5d55b0030dee6
parent8d76fb8778264b21820f7294c9845a1d00a466b7
Fix GCC compile warning for "bad-function-cast" on Windows

Trick the compiler by hiding the cast in a function call.

* src/os.h: Declare the new function.
* src/w32/w32os.c (get_handle_for_fd): Convert and cast a file
descriptor into a Windows HANDLE.
(check_io_state): Call the new function rather than casting.
(osync_release): Ditto.
(fd_inherit): Ditto.
(fd_noinherit): Ditto.
* src/function.c (windows32_openpipe): Ditto.
* src/w32/compat/posixfcn.c (isatty): Ditto.
* src/w32/subproc/sub_proc.c (process_easy): Ditto.
src/function.c
src/os.h
src/w32/compat/posixfcn.c
src/w32/subproc/sub_proc.c
src/w32/w32os.c