From: Simon Marchi Date: Wed, 25 Mar 2020 22:39:56 +0000 (-0400) Subject: Fix: sessiond: make the --without-lttng-ust version of launch_application_notificatio... X-Git-Tag: v2.12.0-rc2~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cf7fadeeec3a43eca7ac53e9640b5d9b55103eea;p=lttng-tools.git Fix: sessiond: make the --without-lttng-ust version of launch_application_notification_thread static When building with --without-lttng-ust, a simple version of launch_application_notification_thread, implemented in the header file, is used. We get this warning: CC main.o In file included from /home/simark/src/lttng-tools/src/bin/lttng-sessiond/main.c:61: /home/simark/src/lttng-tools/src/bin/lttng-sessiond/notify-apps.h:17:6: error: no previous prototype for ‘launch_application_notification_thread’ [-Werror=missing-prototypes] 17 | bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd) | ^~~~~~~ Make the function `static inline` to avoid that. The `inline` is not strictly required here, but if that header ended up included by some other source file that didn't use launch_application_notification_thread, we would get a -Wunused-function warning. The `inline` avoids that. Change-Id: I19605e0594af0d7997951def2da3a6313bf65e11 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/notify-apps.h b/src/bin/lttng-sessiond/notify-apps.h index c61abdda3..ab6289a33 100644 --- a/src/bin/lttng-sessiond/notify-apps.h +++ b/src/bin/lttng-sessiond/notify-apps.h @@ -14,6 +14,7 @@ bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd); #else /* HAVE_LIBLTTNG_UST_CTL */ +static bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd) { return true;