]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
compiler: -Wsuggest-attribute=noreturn hardening
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Feb 2019 19:44:57 +0000 (20:44 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Feb 2019 21:36:30 +0000 (22:36 +0100)
Warn about functions that might be candidates for attributes pure, const
or noreturn or malloc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac
src/tests/state_server.c

index 12fe0daeed8013985b7b1913268d6ca86caf546a..4daff5b82ce933d6e6c6986d7d99a1963928ff1e 100644 (file)
@@ -706,6 +706,7 @@ AX_CHECK_COMPILE_FLAG([-Wmissing-include-dirs], [CFLAGS="$CFLAGS -Wmissing-inclu
 AX_CHECK_COMPILE_FLAG([-Wold-style-definition], [CFLAGS="$CFLAGS -Wold-style-definition"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Winit-self], [CFLAGS="$CFLAGS -Winit-self"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Wfloat-equal], [CFLAGS="$CFLAGS -Wfloat-equal"],,[-Werror])
+AX_CHECK_COMPILE_FLAG([-Wsuggest-attribute=noreturn], [CFLAGS="$CFLAGS -Wsuggest-attribute=noreturn"],,[-Werror])
 
 AX_CHECK_LINK_FLAG([-z relro], [LDLAGS="$LDLAGS -z relro"],,[])
 AX_CHECK_LINK_FLAG([-z now], [LDLAGS="$LDLAGS -z now"],,[])
index a814227ea016df45c3fb936d84e7113d6f963739..d24ba8b3db5da1c74f2a3aa85c4db756f249a814 100644 (file)
@@ -38,7 +38,7 @@ struct thread_args {
        struct lxc_container *c;
 };
 
-void *state_wrapper(void *data)
+static void *state_wrapper(void *data)
 {
        struct thread_args *args = data;