From: Jérémie Galarneau Date: Wed, 19 Apr 2023 19:15:26 +0000 (-0400) Subject: lttng: start: move static symbols to anonymous namespace X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9183bb278808f35193c0d248c537950495c719dc;p=lttng-tools.git lttng: start: move static symbols to anonymous namespace Signed-off-by: Jérémie Galarneau Change-Id: I295b39aa2f286bc494a0d2eb0b5c8528e0b6afc3 --- 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