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 CA6D6156FB for ; Sun, 29 Oct 2023 23:02:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YZosUkxc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E4C6C433AB; Sun, 29 Oct 2023 23:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698620543; bh=4/C17ww5DjA3eWjC0vh6NWIdEDDn79fbftPuDSQdUzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YZosUkxcBAn2tN0i2E5bMxUtpukL+On8blUdvweylqhKxtg4gRWjsKFtJ7JQzkuQI WWIZKfCPREAjAOCXjSc+4XEfRB0p5M8ndtR0ZcmoW1457+BY2jK/DctWpAAYs6Yf45 rLoHaODWcj1MAOklJGT0mURCygJn78k0FoWbjE/HylLyX6cQJ0dp4LxrE5NvvojeMy YcqpgIdKisSRmft8hE1d5w/zNrJeABmsc6tOonb6qQO4vc/tPSNVd1oRTYPPwNMVW/ qA4uqfz15k8ehuR+UVW1hL3tMOw+/0eox6lyaCUa+yY494MTbxRXdGm5tWND3KElsp cBs80Mb0pKzpA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Florian Westphal , kernel test robot , Sasha Levin , pablo@netfilter.org, kadlec@netfilter.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 05/11] netfilter: nfnetlink_log: silence bogus compiler warning Date: Sun, 29 Oct 2023 19:01:56 -0400 Message-ID: <20231029230213.793581-5-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029230213.793581-1-sashal@kernel.org> References: <20231029230213.793581-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 4.14.328 Content-Transfer-Encoding: 8bit From: Florian Westphal [ Upstream commit 2e1d175410972285333193837a4250a74cd472e6 ] net/netfilter/nfnetlink_log.c:800:18: warning: variable 'ctinfo' is uninitialized The warning is bogus, the variable is only used if ct is non-NULL and always initialised in that case. Init to 0 too to silence this. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309100514.ndBFebXN-lkp@intel.com/ Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 40ba9c8e3c078..7d7a94e3fc507 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -637,8 +637,8 @@ nfulnl_log_packet(struct net *net, unsigned int plen; struct nfnl_log_net *log = nfnl_log_pernet(net); const struct nfnl_ct_hook *nfnl_ct = NULL; + enum ip_conntrack_info ctinfo = 0; struct nf_conn *ct = NULL; - enum ip_conntrack_info ctinfo; if (li_user && li_user->type == NF_LOG_TYPE_ULOG) li = li_user; -- 2.42.0