netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning
@ 2023-01-31 13:04 Andrei Gherzan
  2023-01-31 13:04 ` [PATCH v2 2/4] selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided Andrei Gherzan
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Andrei Gherzan @ 2023-01-31 13:04 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Shuah Khan
  Cc: Andrei Gherzan, netdev, linux-kselftest, linux-kernel

This change fixes the following compiler warning:

/usr/include/x86_64-linux-gnu/bits/error.h:40:5: warning: ‘gso_size’ may
be used uninitialized [-Wmaybe-uninitialized]
   40 |     __error_noreturn (__status, __errnum, __format,
   __va_arg_pack ());
         |
	 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 udpgso_bench_rx.c: In function ‘main’:
	 udpgso_bench_rx.c:253:23: note: ‘gso_size’ was declared here
	   253 |         int ret, len, gso_size, budget = 256;

Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>
---
 tools/testing/selftests/net/udpgso_bench_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testing/selftests/net/udpgso_bench_rx.c
index 6a193425c367..d0895bd1933f 100644
--- a/tools/testing/selftests/net/udpgso_bench_rx.c
+++ b/tools/testing/selftests/net/udpgso_bench_rx.c
@@ -250,7 +250,7 @@ static int recv_msg(int fd, char *buf, int len, int *gso_size)
 static void do_flush_udp(int fd)
 {
 	static char rbuf[ETH_MAX_MTU];
-	int ret, len, gso_size, budget = 256;
+	int ret, len, gso_size = 0, budget = 256;
 
 	len = cfg_read_all ? sizeof(rbuf) : 0;
 	while (budget--) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-01-31 20:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 13:04 [PATCH v2 1/4] selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning Andrei Gherzan
2023-01-31 13:04 ` [PATCH v2 2/4] selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided Andrei Gherzan
2023-01-31 13:35   ` Willem de Bruijn
2023-01-31 14:40     ` Andrei Gherzan
2023-01-31 13:04 ` [PATCH v2 3/4] selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs Andrei Gherzan
2023-01-31 13:33   ` Willem de Bruijn
2023-01-31 14:45     ` Paolo Abeni
2023-01-31 14:56     ` Andrei Gherzan
2023-01-31 13:04 ` [PATCH v2 4/4] selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking Andrei Gherzan
2023-01-31 13:39   ` Willem de Bruijn
2023-01-31 14:51   ` Paolo Abeni
2023-01-31 15:08     ` Andrei Gherzan
2023-01-31 16:22       ` Paolo Abeni
2023-01-31 16:31         ` Andrei Gherzan
2023-01-31 18:26           ` Paolo Abeni
2023-01-31 20:36             ` Andrei Gherzan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).