From c26ada1f972a9f76ec75daf036e31bf05e1bfa7f Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 31 Mar 2021 15:14:44 -0400 Subject: [PATCH] Clean-up: tests: fix -Wshadow error in run_active_set_combination MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ... by renaming one of the pipe variables. Change-Id: I550c4c4c8c71171f435bdc1fb6afffdd68d1147b Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- tests/unit/test_utils_compat_poll.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_utils_compat_poll.c b/tests/unit/test_utils_compat_poll.c index 436af5f6f..0cb7b2387 100644 --- a/tests/unit/test_utils_compat_poll.c +++ b/tests/unit/test_utils_compat_poll.c @@ -238,16 +238,18 @@ static int run_active_set_combination(unsigned int fd_count, /* Write one byte for all active fds that should be active. */ for (i = 0; i < fd_count; i++) { - struct lttng_pipe *pipe; + struct lttng_pipe *borrowed_pipe; /* Should this fd be made active? */ if (!(active_fds_mask & (1 << i))) { continue; } - pipe = lttng_dynamic_pointer_array_get_pointer(&pipes, i); + borrowed_pipe = lttng_dynamic_pointer_array_get_pointer( + &pipes, i); - ret = lttng_pipe_write(pipe, &(char) {'a'}, sizeof(char)); + ret = lttng_pipe_write( + borrowed_pipe, &(char){'a'}, sizeof(char)); if (ret != sizeof(char)) { diag("Failed to write to pipe"); ret = -1; -- 2.34.1