From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932447AbcKGPlW (ORCPT ); Mon, 7 Nov 2016 10:41:22 -0500 Received: from resqmta-po-07v.sys.comcast.net ([96.114.154.166]:35859 "EHLO resqmta-po-07v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932359AbcKGPlU (ORCPT ); Mon, 7 Nov 2016 10:41:20 -0500 From: Shuah Khan To: trond.myklebust@primarydata.com, anna.schumaker@netapp.com Cc: Shuah Khan , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() Date: Mon, 7 Nov 2016 08:41:13 -0700 Message-Id: <20161107154114.26803-3-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161107154114.26803-1-shuahkh@osg.samsung.com> References: <20161107154114.26803-1-shuahkh@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfODJvsB8qab7iJ2E0zsKHr6exh3FGMOsyr6aWQxCi/ytpAqGniKSGYxhAfZ9jF5nSPAcGJtaWzq+gK/2H5IbLyE2LAc6wvwF8azSzAl22xURy6RMOZ6o 9C+cEVPOTtMmBZY2ni8QjFUuSNR/gQ+WXeKCRVsRT8XtR7FfrkEulKD5Wd8XHeEn27CL8YcEFK+jPrTT9mo7QwOemOIw9p4w3MfrhOJCVZqVyTw7QhKJUFmv F5bIme2cLF9oV5e0jmjdm2+uzSEakiGDXFTcGp3Rphwcq0zGJ9Dsq1nv6VRiA0tJXH3Gqtxvd8wenNiygAxudc7PGAVPIcGphjzSSMWpcvNnaBGxWZgkKWXe cKTzkPXH Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following warn: net/netfilter/ipvs/ip_vs_sync.c: In function ‘ip_vs_proc_sync_conn’: net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.init_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct ip_vs_sync_conn_options opt; ^~~ net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.delta’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.previous_delta’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).init_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).delta’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).previous_delta’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Shuah Khan --- fs/nfs/nfs4session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c index b629730..68e700e 100644 --- a/fs/nfs/nfs4session.c +++ b/fs/nfs/nfs4session.c @@ -196,7 +196,7 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid, static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl, u32 slotid, u32 seq_nr) { - u32 cur_seq; + u32 cur_seq = 0; bool ret = false; spin_lock(&tbl->slot_tbl_lock); -- 2.9.3