[PATCH v9 02/15] app/test: remove unused variable

Stephen Hemminger stephen at networkplumber.org
Thu Feb 20 17:27:08 CET 2025


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));
 
 	/*
 	 * initialize circular buffer
-- 
2.47.2



More information about the dev mailing list