From: Jérémie Galarneau Date: Fri, 12 Feb 2021 18:34:47 +0000 (-0500) Subject: Clean-up: lttng: silence bogus warning X-Git-Tag: v2.13.0-rc1~328 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7fefa9078da4d4e08c22f4eadd24a6e8d4dd4b4c;p=lttng-tools.git Clean-up: lttng: silence bogus warning clang warns that `name_search_ret` may be used unitiliazed if the domain is none of {ust, python, log4j, jul}. However, those branches are only accessible when one of these domains is used. Signed-off-by: Jérémie Galarneau Change-Id: Ibfea5be140a29a60ff8a60f0a994fcd815adb85d --- diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index 4b37a01aa..570a3a642 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -919,7 +919,8 @@ static int enable_events(char *session_name) name_search_ret = loglevel_log4j_name_to_value(opt_loglevel, &loglevel); ev->loglevel = (int) loglevel; - } else if (opt_python) { + } else { + /* python domain. */ enum lttng_loglevel_python loglevel; name_search_ret = loglevel_python_name_to_value(opt_loglevel, &loglevel); @@ -1310,7 +1311,8 @@ static int enable_events(char *session_name) name_search_ret = loglevel_log4j_name_to_value(opt_loglevel, &loglevel); ev->loglevel = (int) loglevel; - } else if (opt_python) { + } else { + /* python domain. */ enum lttng_loglevel_python loglevel; name_search_ret = loglevel_python_name_to_value(opt_loglevel, &loglevel);