From 8471c10564859a5dc4a6e2ba39e8d9fdfba26e62 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 9 Mar 2022 10:19:17 -0500 Subject: [PATCH] configure: add '-Wmissing-noreturn' to warning flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I95a981348109d4614afcfe9c85f971e65afc2765 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- configure.ac | 1 + src/bin/lttng/lttng.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 8ca893f75..65f9b0f75 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,7 @@ m4_define([WARN_FLAGS_COMMON_LIST], [ dnl -Wall dnl -Wnull-dereference dnl -Wundef dnl + -Wmissing-noreturn dnl -Wlogical-op dnl dnl We currently get this warning when building with Clang: dnl diff --git a/src/bin/lttng/lttng.cpp b/src/bin/lttng/lttng.cpp index 2b169cb0e..27e332e07 100644 --- a/src/bin/lttng/lttng.cpp +++ b/src/bin/lttng/lttng.cpp @@ -150,6 +150,7 @@ static void list_options(FILE *ofp) /* * clean_exit */ +__attribute__((noreturn)) static void clean_exit(int code) { DBG("Clean exit"); -- 2.34.1