lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aSSdH58ozNT-zWLM@fedora>
Date: Mon, 24 Nov 2025 23:29:59 +0530
From: Ankit Khushwaha <ankitkhushwaha.linux@...il.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Jason Xing <kernelxing@...cent.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>,
	netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/net: initialize char variable to null

On Mon, Nov 24, 2025 at 12:46:52PM -0500, Willem de Bruijn wrote:
> Ankit Khushwaha wrote:
> > char variable in 'so_txtime.c' & 'txtimestamp.c' left uninitilized
> > by when switch default case taken. raises following warning.
> > 
> > 	txtimestamp.c:240:2: warning: variable 'tsname' is used uninitialized
> > 	whenever switch default is taken [-Wsometimes-uninitialized]
> > 
> > 	so_txtime.c:210:3: warning: variable 'reason' is used uninitialized
> > 	whenever switch default is taken [-Wsometimes-uninitialized]
> > 
> > initialize these variables to NULL to fix this.
> > 
> > Signed-off-by: Ankit Khushwaha <ankitkhushwaha.linux@...il.com>
> 
> These are false positives as the default branches in both cases exit
> the program with error(..).
> 
> Since we do not observe these in normal kernel compilations: are you
> enabling non-standard warnings?

Hi Willem,

this warning appeared while building the 'tools/testing/selftests/net'
multiple times. 
Cmd used to build
	make -C tools/testing/selftests/net  CC=clang V=1 -j8

while test building by "make -C tools/testing/selftests/ CC=clang V=1
-j8" doesn't raises these warning.

Thanks,
-- Ankit

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ