Depending on bison version and Clang config, generated files cause various warnings. In gitlab CI, there is an unused function in wbemprox. I don't see it on newer bison and LLVM, but there are other -Wunused-but-set-variable warning instead. This was partially fixed in upstream bison: https://git.savannah.gnu.org/cgit/bison.git/commit/?id=a166d5450e3f47587b98f... The fix does not take into account MSVC targets, I tried upstreaming a fix for that, with no success: https://savannah.gnu.org/patch/?10420 https://lists.gnu.org/archive/html/bison-patches/2023-11/msg00000.html
Together with !5628, this allows enabling `-Werror` in out CI.
From: Jacek Caban jacek@codeweavers.com
Depending on bison version and Clang config, generated files cause various warnings. In gitlab CI, there is an unused function in wbemprox. I don't see it on newer bison and LLVM, but there are other -Wunused-but-set-variable warning instead. This was partially fixed in upstream bison: https://git.savannah.gnu.org/cgit/bison.git/commit/?id=a166d5450e3f47587b98f... The fix does not take into account MSVC targets, I tried upstreaming a fix for that, with no success: https://savannah.gnu.org/patch/?10420 https://lists.gnu.org/archive/html/bison-patches/2023-11/msg00000.html --- configure.ac | 8 +++++++- tools/makedep.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 3f54230b46b..dc7ba2c2a90 100644 --- a/configure.ac +++ b/configure.ac @@ -175,7 +175,7 @@ case "$host_cpu" in x86_64) HOST_ARCH=x86_64 ;; esac m4_set_add_all([_AC_SUBST_VARS],[HOST_ARCH]m4_foreach([cpu],[aarch64,arm,arm64ec,i386,x86_64], - [m4_foreach([var],[CC,CFLAGS,EXTRACFLAGS,LDFLAGS,DEBUG,TARGET,DELAYLOADFLAG,DISABLED_SUBDIRS],[,cpu[_]var])])) + [m4_foreach([var],[CC,CFLAGS,EXTRACFLAGS,TABCFLAGS,LDFLAGS,DEBUG,TARGET,DELAYLOADFLAG,DISABLED_SUBDIRS],[,cpu[_]var])]))
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir, [wine_cv_toolsdir="$with_wine_tools" @@ -960,6 +960,12 @@ This is an error since --enable-archs=$wine_arch was requested.])]) WINE_TRY_PE_CFLAGS([-Wabsolute-value]) WINE_TRY_PE_CFLAGS([-Wenum-enum-conversion],[:],WINE_TRY_PE_CFLAGS([-Wenum-conversion]))
+ if test -n "$llvm_extra_cflags" + then + WINE_TRY_PE_CFLAGS([-Wunused-function],[AS_VAR_APPEND(${wine_arch}_TABCFLAGS,[" -Wno-unused-function"])]) + WINE_TRY_PE_CFLAGS([-Wunused-but-set-variable],[AS_VAR_APPEND(${wine_arch}_TABCFLAGS,[" -Wno-unused-but-set-variable"])]) + fi + dnl GCC can't handle large files when -Wmisleading-indentation is enabled (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549) WINE_TRY_PE_CFLAGS([-flarge-source-files -Wmisleading-indentation],[AS_VAR_APPEND(${wine_arch}_EXTRACFLAGS,[" -Wno-misleading-indentation"])])
diff --git a/tools/makedep.c b/tools/makedep.c index f22552f8400..9f88f58bccb 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -3260,6 +3260,7 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou
output_filenames( cpp_flags ); output_filename( var_cflags ); + if (strendswith( source->name, ".tab.c" )) output_filename( arch_make_variable( "TABCFLAGS", arch )); output( "\n" );
if (make->testdll && strendswith( source->name, ".c" ) &&
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145763
Your paranoid android.
=== debian11b (64 bit WoW report) ===
quartz: dsoundrender: Timeout
winmm: mci: Timeout
I'd suggest to silence only the specific symbols, something like:
```diff diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y index ba33396ddeb4..541cd2450f0b 100644 --- a/dlls/wbemprox/wql.y +++ b/dlls/wbemprox/wql.y @@ -299,6 +299,7 @@ associatorsof: }
PARSER_BUBBLE_UP_VIEW( parser, $$, view ); + (void)yysymbol_name; /* avoid unused function warning */ } | TK_ASSOCIATORS TK_OF path TK_WHERE keywordlist { ```
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145882
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/wbemprox/wql.y:299 Task: Patch failed to apply
=== debian11b (build log) ===
error: patch failed: dlls/wbemprox/wql.y:299 Task: Patch failed to apply
Fwiw some of these can be solved either by using `%define parse.error detailed` instead of `%define parse.error verbose`, which requires Bison 3.6 (2020-05-08), or removing `%define parse.error` entirely as some of the parsers do.
The yynerrs one is more annoying but can also be solved by implicitly passing it to the error callback, like (with more changes a bit here and there where the function is called directly).
```diff +#define parser_error(a,b) parser_error_(a, b, parser_nerrs) extern void parser_warning( const struct location *where, const char *message ); -extern void parser_error( const struct location *where, const char *message ); +extern void parser_error_( const struct location *where, const char *message, int error_count ); ```