From 21a4b05678c20899ad0aa1d3efb565d47d56ecf4 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 31 Mar 2021 14:55:41 -0400 Subject: [PATCH] Clean-up: lttng: fix -Wshadow error in lttng_session_descriptor MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ... by moving variable declaractions to narrower scopes. Change-Id: I2ae3586596f543706b8e2ee5c7d4ce52e0658a9e Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/create.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index 22d1790f7..677c17329 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -132,7 +132,6 @@ end: static struct lttng_session_descriptor *create_session_descriptor(void) { - int ret; ssize_t uri_count; enum output_type output_type; struct lttng_uri *uris = NULL; @@ -144,6 +143,7 @@ struct lttng_session_descriptor *create_session_descriptor(void) output_type = OUTPUT_NONE; } else if (opt_output_path) { char *expanded_output_path; + int ret; output_type = OUTPUT_LOCAL; expanded_output_path = utils_expand_path(opt_output_path); @@ -160,6 +160,8 @@ struct lttng_session_descriptor *create_session_descriptor(void) goto end; } } else if (opt_url || opt_ctrl_url) { + int ret; + uri_str1 = opt_ctrl_url ? opt_ctrl_url : opt_url; uri_str2 = opt_data_url; -- 2.34.1