From 9183bb278808f35193c0d248c537950495c719dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 19 Apr 2023 15:15:26 -0400 Subject: [PATCH] lttng: start: move static symbols to anonymous namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Change-Id: I295b39aa2f286bc494a0d2eb0b5c8528e0b6afc3 --- src/bin/lttng/commands/start.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/bin/lttng/commands/start.cpp b/src/bin/lttng/commands/start.cpp index 556c1120d..1d787ce65 100644 --- a/src/bin/lttng/commands/start.cpp +++ b/src/bin/lttng/commands/start.cpp @@ -21,14 +21,6 @@ #include #include -static struct mi_writer *writer; - -#ifdef LTTNG_EMBED_HELP -static const char help_msg[] = -#include - ; -#endif - enum { OPT_HELP = 1, OPT_LIST_OPTIONS, @@ -36,7 +28,16 @@ enum { OPT_ALL, }; -static struct poptOption long_options[] = { +namespace { +struct mi_writer *writer; + +#ifdef LTTNG_EMBED_HELP +const char help_msg[] = +#include + ; +#endif + +struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ { "help", 'h', POPT_ARG_NONE, nullptr, OPT_HELP, nullptr, nullptr }, { "list-options", 0, POPT_ARG_NONE, nullptr, OPT_LIST_OPTIONS, nullptr, nullptr }, @@ -45,7 +46,7 @@ static struct poptOption long_options[] = { { nullptr, 0, 0, nullptr, 0, nullptr, nullptr } }; -static int mi_print_session(const char *session_name, int enabled) +int mi_print_session(const char *session_name, int enabled) { int ret; @@ -78,7 +79,7 @@ end: * * Start tracing for all trace of the session. */ -static int start_tracing(const char *session_name) +int start_tracing(const char *session_name) { int ret; @@ -117,7 +118,7 @@ error: return ret; } -static int start_tracing(const struct session_spec& spec) +int start_tracing(const struct session_spec& spec) { int ret = CMD_SUCCESS; bool had_warning = false; @@ -148,6 +149,7 @@ static int start_tracing(const struct session_spec& spec) return ret; } +} /* namespace */ /* * cmd_start -- 2.34.1