[PATCH v9 02/15] app/test: remove unused variable
Thomas Monjalon
thomas at monjalon.net
Wed Jun 11 14:33:26 CEST 2025
20/02/2025 17:27, Stephen Hemminger:
> The buffer tmp is set but never used. This leads to warning
> since the memset could be eliminated by the compiler.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> app/test/test_cmdline_cirbuf.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/app/test/test_cmdline_cirbuf.c b/app/test/test_cmdline_cirbuf.c
> index 8ac326cb02..f6361d49e9 100644
> --- a/app/test/test_cmdline_cirbuf.c
> +++ b/app/test/test_cmdline_cirbuf.c
> @@ -251,11 +251,9 @@ test_cirbuf_string_add_del_reverse(void)
> {
> struct cirbuf cb;
> char buf[CMDLINE_TEST_BUFSIZE];
> - char tmp[CMDLINE_TEST_BUFSIZE];
>
> /* initialize buffers */
> memset(buf, 0, sizeof(buf));
> - memset(tmp, 0, sizeof(tmp));
Another memset was missed in this function.
Fixed while merging.
More information about the dev
mailing list