From: Simon Marchi Date: Wed, 31 Mar 2021 18:50:28 +0000 (-0400) Subject: Clean-up: common: fix -Wshadow error in lttng_trace_chunk_set_as_owner X-Git-Tag: v2.13.0-rc1~132 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3f5de3101699e3745ff9a9dfe26d03c01d9d3830;p=lttng-tools.git Clean-up: common: fix -Wshadow error in lttng_trace_chunk_set_as_owner We can safely re-use the reference_acquired variable at function scope. Change-Id: I4e45c4995d07188d48f5aa36280859ebb3ed2233 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index 8a8481b5d..327612ce2 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -1077,9 +1077,8 @@ enum lttng_trace_chunk_status lttng_trace_chunk_set_as_owner( * A nameless chunk does not need its own output directory. * The session's output directory will be used. */ - const bool reference_acquired = - lttng_directory_handle_get( - session_output_directory); + reference_acquired = lttng_directory_handle_get( + session_output_directory); assert(reference_acquired); chunk_directory_handle = session_output_directory;