From 11bd9cb470017f9934c25aeb77019ccee0e49e3c Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 5 Feb 2020 11:41:23 -0500 Subject: [PATCH] Fix: lttng-sessiond: control reaches end of non-void function warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes the following error when building with GCC 7.4.0 with the following CFLAGS: "-g -fsanitize=address": tracker.c: In function ‘lttng_tracker_id_lookup_string’: tracker.c:405:1: error: control reaches end of non-void function [-Werror=return-type] } ^ At first glance, this seems like a false positive. I don't see how we can reach the end of the function without passing by a return statement. Even considering that, removing the `break` statement makes sense because it's superfluous. Signed-off-by: Francis Deslauriers Change-Id: I0b596d328bc38183f21bd3a6f8419a63207953f3 Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/tracker.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bin/lttng-sessiond/tracker.c b/src/bin/lttng-sessiond/tracker.c index 302971767..cff5af3a0 100644 --- a/src/bin/lttng-sessiond/tracker.c +++ b/src/bin/lttng-sessiond/tracker.c @@ -398,7 +398,6 @@ int lttng_tracker_id_lookup_string(enum lttng_tracker_type tracker_type, default: return LTTNG_ERR_INVALID; } - break; default: return LTTNG_ERR_INVALID; } -- 2.34.1