Re: [PATCH v2 08/13] selftests: net: netlink-dumps: Avoid uninitialized variable warning
From: Guenter Roeck <linux@roeck-us.net>
Date: 2025-12-10 19:09:03
Also in:
bpf, linux-kselftest, lkml
From: Guenter Roeck <linux@roeck-us.net>
Date: 2025-12-10 19:09:03
Also in:
bpf, linux-kselftest, lkml
On 12/10/25 01:13, Jakub Kicinski wrote:
On Fri, 5 Dec 2025 09:10:02 -0800 Guenter Roeck wrote:quoted
The following warning is seen when building netlink-dumps. netlink-dumps.c: In function ‘dump_extack’: ../kselftest_harness.h:788:35: warning: ‘ret’ may be used uninitialized Problem is that the loop which initializes 'ret' may exit early without initializing the variable if recv() returns an error. Always initialize 'ret' to solve the problem.Are you sure you're working off the latest tree? I think this should already be fixed by 13cb6ac5b50
Sorry for missing the fix. I was working off v6.18, which was the tip of the tree when I wrote the patch.
I applied the other 3 networking changes.
Thanks a lot! Guenter