https://bugs.winehq.org/show_bug.cgi?id=56601
--- Comment #3 from Patrick patrick+winehq.org@laimbock.com --- Thank you for your feedback. And noted. This is wine-9.4 + wine-staging-9.4.1. I added -Werror to the flags in Fedora's wine.spec which are now:
CFLAGS: -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O2 -Werror
Make -j1 resulted in this error: ... In file included from dlls/ntdll/unix/esync.c:27: include/config.h:844:9: error: "_GNU_SOURCE" redefined [-Werror] 844 | #define _GNU_SOURCE 1 | ^~~~~~~~~~~ dlls/ntdll/unix/esync.c:25:9: note: this is the location of the previous definition 25 | #define _GNU_SOURCE | ^~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:84807: dlls/ntdll/unix/esync.o] Error 1
So I removed that define $ sed -i -e's|#define _GNU_SOURCE||' dlls/ntdll/unix/esync.c
Make again and I got a new error:
dlls/win32u/input.c: In function ‘set_active_window’: dlls/win32u/input.c:1935:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] 1935 | return ret; | ^~~ dlls/win32u/input.c:1812:10: note: ‘ret’ was declared here 1812 | BOOL ret;
So I changed that to BOOL ret = FALSE; $ sed -i -e'1812s/BOOL ret;/BOOL ret = FALSE;/' dlls/win32u/input.c
Make again and I got the same error I reported:
In file included from include/windef.h:271, from include/windows.h:38, from dlls/combase/string.c:22: dlls/combase/string.c: In function 'impl_from_HSTRING_BUFFER': include/winnt.h:888:46: error: initialization of 'const WCHAR (*)[1]' {aka 'const short unsigned int (*)[1]'} from incompatible pointer type 'HSTRING_BUFFER' {aka 'struct HSTRING_BUFFER__ *'} [-Wincompatible-pointer-types] 888 | const typeof(((type *)0)->field) *__ptr = (address); \ | ^ dlls/combase/string.c:63:12: note: in expansion of macro 'CONTAINING_RECORD' 63 | return CONTAINING_RECORD(buffer, struct hstring_private, buffer); | ^~~~~~~~~~~~~~~~~ make: *** [Makefile:6704: dlls/combase/x86_64-windows/string.o] Error 1
Please let me know if you need more information or a change/patch to try. Thanks!
FWIW I'm building 9.4 because that's the latest wine version where the childwindow patch is available and 9.5+ has https://bugs.winehq.org/show_bug.cgi?id=56483 so only 9.4 can be used for music production (wine + yabridge to use Windows VSTs on Linux in a DAW).