From nobody Tue Feb 10 03:38:22 2026 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 635042F5A29; Thu, 5 Feb 2026 17:34:40 +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=1770312880; cv=none; b=SixAfNjamZD5f4/gaCQoAqRYGgva5PX0JompFpHFpAQQGt2AaM2nwFQ0D2hp3dYF3Rn7aACA28cDj/35IqIpyGLequ+X5w8DV3UerVHU0EgnbPwI/KvVxqx1j/4FiUMR12f+pq5HD/GSWCdOu3pfl4uiq8ChOWXA/Ji3FfEHGlo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770312880; c=relaxed/simple; bh=vipdnvkq6uyreagW24yf/YuCiyUEI9cmZmP5NDb9Fq8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g1lakSBfJVaY+/4CyA8EbdD0rU8a0cyAJ9zLcrvcLL2KEzVysd9KZ1c7IoxoqZYWK+6ikIHZnO9bWhng9v7pskKoidXeW1FdH7b/8Uin1CVFmM581U/YgZS5eTFOv/QRneC4bPmMz6iPh0IMNumBrrGuMTWSxwUhA1ShTSHTSAc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CGl+MAbt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CGl+MAbt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 469FCC19421; Thu, 5 Feb 2026 17:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770312880; bh=vipdnvkq6uyreagW24yf/YuCiyUEI9cmZmP5NDb9Fq8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CGl+MAbtRgM3FmcVYWNHtB5eKwzKhhOi9HJOl+cUC7Zvc7VpzuWz79r4fSuBmX1US e4Hzb2hSMoXTxqS8qMdpiBM2tX7F9dClO5OTXkZnP1pVOXEcB9FWhDd2awaKFvT6FK +ktSdam/PYeoCZglWtLHDxcqL22PIY+eFe+IqgrT625uyIJ3zOe5yWohwhGKY0hi7W s1e0ohNmClRNl8KOp2kN0b2s1PNC0lpJFInkM5fFMT8wCVDVW90iWEL/DpplMqsH0T Q+rlw+hUO2R5oir9otS2PAyY5hD/n/czynnR3mEloCiNg4ADFnKvXZ1hTZ2+Rqvdi+ zpuohGpovZ2tw== From: "Matthieu Baerts (NGI0)" Date: Thu, 05 Feb 2026 18:34:24 +0100 Subject: [PATCH net v2 4/4] selftests: mptcp: connect: fix maybe-uninitialize warn 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260205-net-mptcp-misc-fixes-6-19-rc8-v2-4-c2720ce75c34@kernel.org> References: <20260205-net-mptcp-misc-fixes-6-19-rc8-v2-0-c2720ce75c34@kernel.org> In-Reply-To: <20260205-net-mptcp-misc-fixes-6-19-rc8-v2-0-c2720ce75c34@kernel.org> To: Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" , Shuah Khan , linux-kselftest@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1511; i=matttbe@kernel.org; h=from:subject:message-id; bh=vipdnvkq6uyreagW24yf/YuCiyUEI9cmZmP5NDb9Fq8=; b=kA0DAAoWfCLwwvNHCpcByyZiAGmE1KTIIUtqIJ4+1J4/ew7GrKBSZPUzop1jEqgvyfLkHNVq6 Ih1BAAWCgAdFiEEG4ZZb5nneg10Sk44fCLwwvNHCpcFAmmE1KQACgkQfCLwwvNHCpchnQD/ehpj 2DTWtEcxaDZb4zWrIjXpZQaLyebh1NrE0FaRSlcA/24rLaJmG/2YhrPpGutdwbP6MwlJ7Cco9kt di/wvztoI X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 This warning can be seen with GCC 15.2: mptcp_connect.c: In function =E2=80=98main_loop=E2=80=99: mptcp_connect.c:1422:37: warning: =E2=80=98peer=E2=80=99 may be used unin= itialized [-Wmaybe-uninitialized] 1422 | if (connect(fd, peer->ai_addr, peer->ai_addrlen)) | ~~~~^~~~~~~~~ mptcp_connect.c:1377:26: note: =E2=80=98peer=E2=80=99 was declared here 1377 | struct addrinfo *peer; | ^~~~ This variable is set in sock_connect_mptcp() in some conditions. If not, this helper returns an error, and the program stops. So this is a false positive, but better removing it by initialising peer to NULL. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org --- tools/testing/selftests/net/mptcp/mptcp_connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/test= ing/selftests/net/mptcp/mptcp_connect.c index 10f6f99cfd4e..24b4abac8687 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -1296,8 +1296,8 @@ void xdisconnect(int fd) =20 int main_loop(void) { + struct addrinfo *peer =3D NULL; int fd =3D 0, ret, fd_in =3D 0; - struct addrinfo *peer; struct wstate winfo; =20 if (cfg_input && cfg_sockopt_types.mptfo) { --=20 2.51.0