Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1234596lqh; Mon, 6 May 2024 00:51:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5ZeD/XK3uGtwBbxhrWwLUJGHsbY66PiBnoqV9lyvq4635uTNqIjupghuiHsz6NXGroM7Py79ie7giHiGpAbeOicYFUzsDlJwEX4FAjQ== X-Google-Smtp-Source: AGHT+IGhJdc3NAm9I3Kc+AzyUi41v5kknpAvTwOWEJ8pk3r+PsZG0l50rxXazko0KQp0wWw/CbDd X-Received: by 2002:a05:6870:3516:b0:23f:9ca6:a3b0 with SMTP id k22-20020a056870351600b0023f9ca6a3b0mr1995281oah.40.1714981865398; Mon, 06 May 2024 00:51:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714981865; cv=pass; d=google.com; s=arc-20160816; b=Fxgh8vtoOMPWaMRhbTtKKBemJb3mH2jm1ISfrel4KQEoorjv3TFDwgeF19Darq0Nz0 BSlklsaOKNFlAJ0835JDoKJ7fgAxs2je5mhssr6Xvz0NqbBAmwhP6ye9RmodW/sQ9nuS WF0SD4YdpIp46pejusmgW9k83WkYvI+rS0ZHFx9Z04JmWsRxl+xSuOG20DLJqgU5SbkJ Fy63f/z4Lg7lcwenOdBZkD/N/S+TDyHpI+EWn4Zq+aDQjQJGZqgCAT9AN1o09q6owUBi P0OjT/YZ/EYLKaxsMu86sCM4fsewu4MxaOdTTuA2d5npfXRvjaSsyowUNALCyFB4TWYe Gvrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=Ez2D7PmRySWqnaqtath9N9mK9lfTyQu8YK/aeAEfZww=; fh=p0grQeI+TUnWeDrx71tSyGP/qDDeuLR/La/SGZNCQHY=; b=mfpk5Afv/o012QVBHjRpAN+2BP+vlZBzQY6pwv2IRHkXJGxfnAl9+T9hDltLyrvDgW a7owaG+YlaoLGJzIKbGpI3/LvJ/PKomcpqpJHd5drrgKgXWQz1ewhNwNVy/5Ybw95eHV qMmVzw3N3f38ky+RJMXrMScGIaFNAPkG5NbRTG1/WXDq5aNjutd6aRuP10Ex8X4ELwGR j/adpVNyFERVeUIWC4ZRv+oQ+V+9nVQOxUegMIX2K9VolvhL9p1cl/quNX3tsueMvSff 8Mt9XY5YGk7y53ZpOu2y2rvFbqQEULgkhJcVvKugKTQ55EQraAJpvi1QEUe5AsOWL037 iFyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GAhmos70; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m14-20020a63ed4e000000b005e846cc29d0si8012632pgk.226.2024.05.06.00.51.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GAhmos70; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 01E2B282397 for ; Mon, 6 May 2024 07:51:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAF83140E2B; Mon, 6 May 2024 07:50:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GAhmos70" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACA536CDBF; Mon, 6 May 2024 07:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714981837; cv=none; b=FdlccD7eMWL+yhCeykByeZq4vxM/ZOAredtozWzc1aJ0HXt+S06vOe1c0WWyvXmgQJbLFjereWuoe2qXUwFgO8GRQoiCbz6EK+BN1o015agYQpi6Kl1NP8vkVO223e7X28/yP2e7xpXnTgyr7UsEK3BC9asZX+PIDoQLULZqEuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714981837; c=relaxed/simple; bh=HXInDPAgjaWxpnc2isb/l7/UETm/7etL+J7jmNAa9uQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=r9PkxfUYnuZR70AYjsgeNhXhGEsa9jzvVZmM4vLIqzCyaVCugSso8rrXStDkZeb5CykwpFrmrBHwd4FkIJnIHTKnfvVlMPaicBsLm5XyalmnzUS0JUnZ1uJqBJ2gdrczCf0Y5n72Q+fNN6goD6SuD+qcT0snMUd5SWUloK3xjTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GAhmos70; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5ECAC116B1; Mon, 6 May 2024 07:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714981837; bh=HXInDPAgjaWxpnc2isb/l7/UETm/7etL+J7jmNAa9uQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GAhmos70T8aOc5nA0O8mNi5Jfg3HC7YPIWsZAOR/be504ykJLaQlCrnxEqds9omkq gCwmqH1ibBmPBiU7fD3j2QiYyp6VaqLhtq8W+IgS9ukIHdPiCbfdzX2Ctu73IWpdfh 6FTO4bGMz+VOOnBI8rUjhGBfxvTjffOLO73dRCCnF0dGpOok46j6bU7AgrMcHuE2Vw OAHT+SCyuDSMn1qqr7w0YnFgx9qtwtBsleMkNB8bsRbBRmumMX6KXpcMgAr8r7T3K9 GlqpXCvCM3iSwMnC/pQuynlI7l/+PWiA2ZegAEU8nZBrXtMdyMbowbgY9J+mTPF/qq n9aXg28FlvGOg== Message-ID: Date: Mon, 6 May 2024 09:49:14 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH 2/2] selftests/net: fix uninitialized variables Content-Language: en-GB To: John Hubbard , Shuah Khan Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Klassert , Herbert Xu , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Mat Martineau , 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 References: <20240505222639.70317-1-jhubbard@nvidia.com> <20240505222639.70317-2-jhubbard@nvidia.com> From: Matthieu Baerts Autocrypt: addr=matttbe@kernel.org; keydata= xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvbtCbynnnqDDqU c7SPFMpMesgpcu1xFt0F6bcxE+0ojRtSCZ5HDElKlHJNYtD1uwY4UYVGWUGCF/+cY1YLmtfb WdNb/SFo+Mp0HItfBC12qtDIXYvbfNUGVnA5jXeWMEyYhSNktLnpDL2gBUCsdbkov5VjiOX7 CRTkX0UgNWRjyFZwThaZADEvAOo12M5uSBk7h07yJ97gqvBtcx45IsJwfUJE4hy8qZqsA62A nTRflBvp647IXAiCcwWsEgE5AXKwA3aL6dcpVR17JXJ6nwHHnslVi8WesiqzUI9sbO/hXeXw TDSB+YhErbNOxvHqCzZEnGAAFf6ges26fRVyuU119AzO40sjdLV0l6LE7GshddyazWZf0iac nEhX9NKxGnuhMu5SXmo2poIQttJuYAvTVUNwQVEx/0yY5xmiuyqvXa+XT7NKJkOZSiAPlNt6 VffjgOP62S7M9wDShUghN3F7CPOrrRsOHWO/l6I/qJdUMW+MHSFYPfYiFXoLUZyPvNVCYSgs 3oQaFhHapq1f345XBtfG3fOYp1K2wTXd4ThFraTLl8PHxCn4ywARAQABzSRNYXR0aGlldSBC YWVydHMgPG1hdHR0YmVAa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zsmp2+1w559frz4+IC7j/igvJGX4KDDKUs0mlld8J2u2sBXv7CGxdzQoHaz lzVbFe7fduHbABmYz9cefQpO7wDE/Q== Organization: NGI0 Core In-Reply-To: <20240505222639.70317-2-jhubbard@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi John, On 06/05/2024 00:26, 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". This seems like an actual bug. > > 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. > > Signed-off-by: John Hubbard > --- > tools/testing/selftests/net/gro.c | 3 ++- > tools/testing/selftests/net/ip_local_port_range.c | 2 +- > tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 2 +- Thank you for fixing these warnings! The modification in the MPTCP selftest directory looks good to me: Reviewed-by: Matthieu Baerts (NGI0) Cheers, Matt -- Sponsored by the NGI0 Core fund.