There was also another blunder in the same file: IF_MT_DECL produces a warning:
$ gcc -O2 -S -Wall foo.c foo.c: In function ‘foo’: foo.c:2:3: warning: statement with no effect [-Wunused-value] (void *)0; ^ $ clang -O2 -S -Wall foo.c foo.c:2:3: warning: expression result unused; should this cast be to 'void'? [-Wunused-value] (void *)0; ^ ~ I start to appreciate clang's warnings :-) 2020-08-11 Bruno Haible <[email protected]> thread-optim: Fix a compiler warning. * lib/thread-optim.h (IF_MT_DECL): Define differently. diff --git a/lib/thread-optim.h b/lib/thread-optim.h index 5d9a499..0cdcfec 100644 --- a/lib/thread-optim.h +++ b/lib/thread-optim.h @@ -53,7 +53,7 @@ # define IF_MT_DECL char optimize_for_single_thread = __libc_single_threaded # define IF_MT if (!optimize_for_single_thread) #else -# define IF_MT_DECL (void *)0 +# define IF_MT_DECL (void)0 # define IF_MT #endif
