From: Simon Marchi Date: Wed, 31 Mar 2021 18:55:41 +0000 (-0400) Subject: Clean-up: lttng: fix -Wshadow error in lttng_session_descriptor X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=21a4b05678c20899ad0aa1d3efb565d47d56ecf4;p=deliverable%2Flttng-tools.git Clean-up: lttng: fix -Wshadow error in lttng_session_descriptor ... by moving variable declaractions to narrower scopes. Change-Id: I2ae3586596f543706b8e2ee5c7d4ce52e0658a9e Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- 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;