From mboxrd@z Thu Jan 1 00:00:00 1970 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 75ED420B00 for ; Mon, 6 Nov 2023 13:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RT9TJ+jX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E676FC433C8; Mon, 6 Nov 2023 13:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1699276273; bh=TQjN3Df+mS2MzqVEXv4UGLxtwOB5l6Q7gOroUlsFu6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RT9TJ+jXU3zbElcctfXCvw2n15SixctLqo6b2mbj9t3TKAuXtPVQDJL4WEhPHP52H ScRsOKOpz26WSlbsQeS0Sn0YytmNM/Hy3NdwdnqQVR6/3ygUJupfCNMEsUhAoPZFLP KBQtX+B4TI0YvduyTuaEBF2AvS4lTL0lbiKojDro= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , Florian Westphal , Sasha Levin Subject: [PATCH 4.19 48/61] netfilter: nfnetlink_log: silence bogus compiler warning Date: Mon, 6 Nov 2023 14:03:44 +0100 Message-ID: <20231106130301.251185580@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231106130259.573843228@linuxfoundation.org> References: <20231106130259.573843228@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ 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 da05c4d82b944..1735bcb07381c 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -631,8 +631,8 @@ nfulnl_log_packet(struct net *net, unsigned int plen = 0; 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