]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
meson.build: drop suggest-attribute=noreturn build option
authorSerge Hallyn <serge@hallyn.com>
Thu, 3 Oct 2024 18:41:39 +0000 (13:41 -0500)
committerStéphane Graber <stgraber@stgraber.org>
Wed, 4 Dec 2024 21:37:44 +0000 (16:37 -0500)
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 <serge@hallyn.com>
meson.build

index e83b327632f869ef7a3fd0f9bb945441587e442e..6235ee2ff3031b851092303b177840566e9400eb 100644 (file)
@@ -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',