meson: add back '-Wno-unused-result' for gcc

0fd4c84a5e removed this, but it turns out
gcc acts differently and (void) doesn't silence the warning. Hence why
the flag was there. Add it back.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
This commit is contained in:
Dudemanguy 2024-10-16 13:15:38 -05:00
parent e40442676a
commit 7e834ce870
1 changed files with 5 additions and 0 deletions

View File

@ -299,6 +299,11 @@ if cc.has_multi_arguments('-Wformat', '-Werror=format-security')
flags += '-Werror=format-security' flags += '-Werror=format-security'
endif endif
if cc.get_id() == 'gcc'
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
flags +='-Wno-unused-result'
endif
darwin = host_machine.system() == 'darwin' darwin = host_machine.system() == 'darwin'
win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows' win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
posix = not win32 posix = not win32