From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09942C25B10 for ; Tue, 7 May 2024 01:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2/isFDJYAk4G60FFinrwzXV1mPIZGvozDBN+Hl+Mm9A=; b=nLOtw0hsvnQkvSwYscpF72dw/w YscVGeGdipS4+AOo60vcLVTdVeFKfiaLczJljCc61nOCJ6Zp464pP7Ri+7tq1W1ER/GCt7jaFPj3r R8+ZO911Xlda5NW7vV0Ts5u9C8A3xSFRKERjFSubOdX1JBtrmH1NrQmo/hRjrlOQqoDwOpnaMa1nQ P7oqM2+8p91ovx3eE9lnZG9Avz2snUntmn4KoMaIyGCESMGSQ6/pHAp/0hXLJ98jSk18lmvAZ9UYl RU8WhYjLHFtUGLsNRQ3RB2wd+uMIcDReQ3+MLYloKwfYaP/N8B5indHc9gr5cilIIw4iDgVP9W7oz dgLOEH3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s49bw-00000009EuK-1N8d; Tue, 07 May 2024 01:27:16 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s49bt-00000009EtC-2LVb; Tue, 07 May 2024 01:27:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 27240614BA; Tue, 7 May 2024 01:27:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 582A3C116B1; Tue, 7 May 2024 01:27:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715045228; bh=+wuctz0AiwVRvA/EpqH1dAUfEc9dgfyNT226PxPonE0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=erF2OyYo4g4QHD5j+j/3El51K5HlY9YjpCRnz5+/o1sT/zNOJPJwzyi6m6MZDvSys 5sAwwmFyjwIsLj0TcrgdOKkFnsVqRy57dxu+rlRnVFdvJfZhMr6M9JpIxiPBCfganM Gqan89L+VItIyncqv/8uLollGFRnVZusKMFrg3hgWyRxxtSIDYmpjmYhKIKjFcQzel Z4bNtAcx+8yiiBOkgD5JHG1Mhdt7NdAz3qnDeNJ+Cu6VeWQaIA6sfJRFS24fSeTDex IIkLisFrox1YdCcoA/+mw1ftDA47lfMNklduD9b2h6jA4UmOeCkAHQlyPLXaGOVa2R 1xE25HTw3e+KQ== Date: Mon, 6 May 2024 18:27:07 -0700 (PDT) From: Mat Martineau To: John Hubbard cc: Shuah Khan , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Klassert , Herbert Xu , =?ISO-8859-15?Q?Andreas_F=E4rber?= , Manivannan Sadhasivam , Matthieu Baerts , Geliang Tang , Pravin B Shelar , Willem de Bruijn , Alexander Mikhalitsyn , zhujun2 , Petr Machata , Ido Schimmel , Hangbin Liu , Nikolay Aleksandrov , Benjamin Poirier , Sebastian Andrzej Siewior , Dmitry Safonov <0x7f454c46@gmail.com>, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, mptcp@lists.linux.dev, dev@openvswitch.org, Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev Subject: Re: [PATCH v2] selftests/net: fix uninitialized variables In-Reply-To: <20240506190204.28497-1-jhubbard@nvidia.com> Message-ID: <610f9818-b899-1f70-8110-f88db47595ff@kernel.org> References: <20240506190204.28497-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_182713_652851_3BC617DD X-CRM114-Status: GOOD ( 13.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 6 May 2024, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns about three variables that are not initialized in all > cases: > > 1) The opt_ipproto_off variable is used uninitialized if "testname" is > not "ip". Willem de Bruijn pointed out that this is an actual bug, and > suggested the fix that I'm using here (thanks!). > > 2) The addr_len is used uninitialized, but only in the assert case, > which bails out, so this is harmless. > > 3) The family variable in add_listener() is only used uninitialized in > the error case (neither IPv4 nor IPv6 is specified), so it's also > harmless. > > Fix by initializing each variable. > > Cc: Willem de Bruijn > Signed-off-by: John Hubbard Hi John - MPTCP change looks good to me: Acked-by: Mat Martineau _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel