From: Christian Brauner Date: Tue, 5 Feb 2019 19:44:57 +0000 (+0100) Subject: compiler: -Wsuggest-attribute=noreturn hardening X-Git-Tag: lxc-3.2.0~166^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3b4674d44ee6da22c091fd154b6ff62123d3aa2;p=thirdparty%2Flxc.git compiler: -Wsuggest-attribute=noreturn hardening Warn about functions that might be candidates for attributes pure, const or noreturn or malloc. Signed-off-by: Christian Brauner --- diff --git a/configure.ac b/configure.ac index 12fe0daee..4daff5b82 100644 --- a/configure.ac +++ b/configure.ac @@ -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"],,[]) diff --git a/src/tests/state_server.c b/src/tests/state_server.c index a814227ea..d24ba8b3d 100644 --- a/src/tests/state_server.c +++ b/src/tests/state_server.c @@ -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;