]> git.ipfire.org Git - thirdparty/lxc.git/commit
meson.build: drop suggest-attribute=noreturn build option 4482/head
authorSerge Hallyn <serge@hallyn.com>
Thu, 3 Oct 2024 18:41:39 +0000 (13:41 -0500)
committerSerge Hallyn <serge@hallyn.com>
Thu, 3 Oct 2024 18:41:39 +0000 (13:41 -0500)
commita8ca9f5f31da93636901778c88af5c93ba14406f
tree77e75be81e0db59ab4bdc1d2757ed6f6f1185227
parent36497cc90f304d561285bdadf38ab48fa263ce6f
meson.build: drop suggest-attribute=noreturn build option

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