From 010ff57ebb40f1a9aaff99867d2886f0e59f774a Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 30 Jun 2024 20:51:10 +0200 Subject: [PATCH] enable -Werror=unused-result we do not have any of these warnings appearing at the moment, but it seems like a good idea to enable [[nodiscard]] checking anyway. once we start introducing more functions with must-use conditions we will need such checking, and the rust stdlib has proven them very useful. Change-Id: Ibb6b042ae1ec5f527f8dc2809a7816a4c1548ae2 --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 0cb2030e7..7d8a3a315 100644 --- a/meson.build +++ b/meson.build @@ -432,6 +432,7 @@ add_project_arguments( '-Wimplicit-fallthrough', '-Werror=switch', '-Werror=switch-enum', + '-Werror=unused-result', '-Wdeprecated-copy', '-Wignored-qualifiers', # Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked