Re: [PATCH v2 08/13] selftests: net: netlink-dumps: Avoid uninitialized variable warning
Jakub Kicinski <[email protected]> Wed, 10 Dec 2025 18:13:18 +0900
| Newsgroups | gmane.linux.kernel.bpf,gmane.linux.kernel,gmane.comp.emulators.wine.devel,gmane.linux.network |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 5 Dec 2025 09:10:02 -0800 Guenter Roeck wrote: > The following warning is seen when building netlink-dumps. >=20 > netlink-dumps.c: In function =E2=80=98dump_extack=E2=80=99: > ../kselftest_harness.h:788:35: warning: =E2=80=98ret=E2=80=99 may be used= uninitialized >=20 > 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 I applied the other 3 networking changes.