Skip to content

Commit

Permalink
meson: add back '-Wno-unused-result' for gcc
Browse files Browse the repository at this point in the history
0fd4c84 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
  • Loading branch information
Dudemanguy committed Oct 16, 2024
1 parent e404426 commit 7e834ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ if cc.has_multi_arguments('-Wformat', '-Werror=format-security')
flags += '-Werror=format-security'
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'
win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
posix = not win32
Expand Down

0 comments on commit 7e834ce

Please sign in to comment.