From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB94A2D12EA for ; Mon, 24 Nov 2025 18:00:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764007210; cv=none; b=ISzWyFTZMMsfWIgzm1+t533Y/t5i9ivYuyOKC8Uun+7wsBX3nJyoJwfXUxmQShQxAJVQe3L2NOJkB2lcs+GF/p+YXJU+p5d/0kRmbZXUaFgX5KODXvLA6GmOjzNBqEzFBBYDI+QNWsbYMs+ouYSoy9qHDJIuCQwIIOmlxJuDV5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764007210; c=relaxed/simple; bh=xeKarZkaklyd3gpxHsuk4C9/ZNiv+OwseAeiICkTRg4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=egjrOA/m/nxNFq7Ehngf3G5paTr8WD71JOMIDybYvDW2CoJpChZdbkkzm6zpc7UpQHR1d24N4A3hOsFyfkTyrDlQzUHA39K1mlYbJi9bbTQIrBX8YhrGmA2jBsvwv386a1zUg+9+4RAlZr/qF7qXY1Dka/2VhcC1p4Qtv2QWsFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eHZhVOwe; arc=none smtp.client-ip=209.85.210.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eHZhVOwe" Received: by mail-pf1-f195.google.com with SMTP id d2e1a72fcca58-7b7828bf7bcso5655292b3a.2 for ; Mon, 24 Nov 2025 10:00:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764007208; x=1764612008; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mwc0wEErQjElnL7obMEURy2H0bzgY2YYjZc6h4X9QZE=; b=eHZhVOweU3FA/ObZnOxFSKw6bziTB5HuNNnBnnjN3ZUyjp6Dvymj+/Qy6C0UWmKCCb voPFInL0v0b7nqOxLl57SX6fXQM2qAczjb23um1E5//v2wBOjoJNNyyXqAlgwkiqd6Vt uXPmJd+pe/iSLxoVi2KPFrg1gD5Pbaqi9sVO5T81BTl6FM6KdA6eEcc0VXVFVo4Z5bSL UUPzvF16CdLFjl+6fajuBcxOhfJbbaM+9Ty1oX1Ez/An6nGXCX6I/p1ubvHVbogO0+gN UZHX/qsPlMqIH6exdPmsbmItNioUCFkFMu1XOJ5xuMsz/JMyYvIq/eGm0wS02pr9l+G3 h1iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764007208; x=1764612008; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mwc0wEErQjElnL7obMEURy2H0bzgY2YYjZc6h4X9QZE=; b=tKinR/7Lb1p7tfbWzwL2HSBc3cw/aE9UzfQswu0MvQGjLyH92za+d1tggtA849ov+X VvfDOSPaGUqqq7H2QBquiV00ZHHr4CcYbqPkKwqXgpYQhBEt0/dqcI/+g1XnuoUSO9Fb XICflMGQdVL0ShLGoqypAACxdNhNaSSjkZ5TNWLZTE0tdKyFHOr7BowFFttW80U+rQvD wq4ttxtWI58cb7IEgqI9UePQiPGIyIQNfWT7BhmZK6KdOM1rMEl4mieC+yFWMh+Wjt55 SKSUjWCt9+modpOEygT97GIgmaqeIGOkkLETz4rq834hSIY39WLdBJ8h8svaD30BNNzM Eyug== X-Forwarded-Encrypted: i=1; AJvYcCVQ0j/3/h6wDVSVDJ8NOsqAG0y0ZvcI27hXl3A7jorEqPe6ldJqijXJGrzfxnwEOvwWwkrndx2DlAZTJTk=@vger.kernel.org X-Gm-Message-State: AOJu0YzbRxM1mh0ooP6UjWqLSYBJzdAy12sOIvd2j1a9Z+FSH4QPZWy/ x2cOF90iULBFMEyei8spynRRzR5EaHI5zrlJQeQtn2PS2+x2PkQESOsm X-Gm-Gg: ASbGnct0hJzwz0UYcsNdkyvdTFZ9Gci1WloB0D8P/Z+WR3/cLk4VMsThaxoO+hYVsvu ymxH2ls3mSIPulh0XhionGqNnNRzOAjNDjfSM0hR9CcS823WoElE7rP//7SzBil9A1u7S0Xzgth gAQfaPOKEe4UxjmQoCdmm6+8d1PU+idSnub4tWYzoumqViYuaYxXcbh2P4OcGqZJu551HMF5FK3 23SnNdqjf6Lz/YloF2iQ46SsJlAcsI3yeDEHlaUhdi4m1p5tc/sJIeG0J9u2vE/iOFMf0XPBT+a 798pV4bN8ayspUfYPOjoyNoy5E99t2eOIwgvlIIfrfvIhoKfVFaJg8/t6hf+Inv2wRJd/3B/qLp 9m7iDzIgMEiwyAAI3QT8u7r1gdT2fY6/ktW6fUxkXH8x+RdL2MRcp9O+ZNhvsEsuFnc+sV3tSpR 3tj91Ca5SXGSYuWWKYkOQl163dVKoQTq9P/4m8kVt5 X-Google-Smtp-Source: AGHT+IER74fvOLSGEfGwFDnZuS4IVDFpU0C2s1EkdQfgEctIUUfm6XcENb38f8Cs/r28V+tnVr0Upw== X-Received: by 2002:a05:6a20:748d:b0:34e:975:3bb9 with SMTP id adf61e73a8af0-3614edb433bmr13952748637.49.1764007207909; Mon, 24 Nov 2025 10:00:07 -0800 (PST) Received: from fedora ([103.120.31.122]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7c3f0b63aefsm15313120b3a.52.2025.11.24.10.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Nov 2025 10:00:07 -0800 (PST) Date: Mon, 24 Nov 2025 23:29:59 +0530 From: Ankit Khushwaha To: Willem de Bruijn Cc: Jason Xing , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/net: initialize char variable to null Message-ID: References: <20251124161324.16901-1-ankitkhushwaha.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > 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