Skip to content

Commit

Permalink
meson.build: drop suggest-attribute=noreturn build option
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hallyn committed Oct 3, 2024
1 parent 36497cc commit a8ca9f5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit a8ca9f5

Please sign in to comment.