From a8ca9f5f31da93636901778c88af5c93ba14406f Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Thu, 3 Oct 2024 13:41:39 -0500 Subject: [PATCH] meson.build: drop suggest-attribute=noreturn build option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The suggest-attribute=noreturn option marks functions which will never return, to give the compiler some hints. It catches all of our src/lxc/tools/*.c *_main functions as follows: error: function might be candidate for attribute ‘noreturn’ [-Werror=suggest-attribute=noreturn] But if we mark those __noreturn, then the compiler complains that: ../src/lxc/tools/lxc_attach.c:320:53: warning: ‘main’ specifies less restrictive attribute than its target ‘lxc_attach_main’: ‘noreturn’ [-Wmissi ng-attributes] 320 | int __attribute__((weak, alias("lxc_attach_main"))) main(int argc, char *argv[]); This recommendation is really not very important, so let's not ask the build to warn about it. Signed-off-by: Serge Hallyn --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index 0b5ff24ab..1f86a6606 100644 --- a/meson.build +++ b/meson.build @@ -204,7 +204,6 @@ possible_cc_flags = [ '-Wunused-but-set-variable', '-Wno-unused-parameter', '-Wfloat-equal', - '-Wsuggest-attribute=noreturn', '-Werror=return-type', '-Werror=incompatible-pointer-types', '-Wformat=2', -- 2.47.2