X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00, FH_DATE_PAST_20XX autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o0J0f95l142649 for ; Mon, 18 Jan 2010 18:41:10 -0600 X-ASG-Debug-ID: 1263861727-471c00140000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id A980111F8BDA for ; Mon, 18 Jan 2010 16:42:08 -0800 (PST) Received: from mail.internode.on.net (bld-mail17.adl2.internode.on.net [150.101.137.102]) by cuda.sgi.com with ESMTP id vbMpGtxKM9mHZnFw for ; Mon, 18 Jan 2010 16:42:08 -0800 (PST) Received: from discord (unverified [121.44.156.64]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 11404573-1927428 for ; Tue, 19 Jan 2010 11:12:07 +1030 (CDT) Received: from [192.168.1.6] (helo=disturbed) by discord with esmtp (Exim 4.69) (envelope-from ) id 1NX2AN-0003Fz-KK for xfs@oss.sgi.com; Tue, 19 Jan 2010 11:41:55 +1100 Received: from dave by disturbed with local (Exim 4.71) (envelope-from ) id 1NX2AM-0003cr-V7 for xfs@oss.sgi.com; Tue, 19 Jan 2010 11:41:54 +1100 From: Dave Chinner To: xfs@oss.sgi.com X-ASG-Orig-Subj: [PATCH 1/2] xfs: suppress spurious uninitialised var warning in xfs_bmapi() Subject: [PATCH 1/2] xfs: suppress spurious uninitialised var warning in xfs_bmapi() Date: Tue, 19 Jan 2010 11:41:50 +1100 Message-Id: <1263861711-13900-2-git-send-email-david@fromorbit.com> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1263861711-13900-1-git-send-email-david@fromorbit.com> References: <1263861711-13900-1-git-send-email-david@fromorbit.com> X-Barracuda-Connect: bld-mail17.adl2.internode.on.net[150.101.137.102] X-Barracuda-Start-Time: 1263861729 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.20188 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Initialise the xfs_bmalloca_t structure to zero to avoid uninitialised variable warnings. This is done by zeroing the arg structure rather than using the uninitialised_var() trick so we know for certain that the structure is correctly initialised as xfs_bmapi is a very complex function and it is difficult to prove warnings are spurious. Signed-off-by: Dave Chinner --- fs/xfs/xfs_bmap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 7c6d9ac..1869fb9 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -4471,7 +4471,7 @@ xfs_bmapi( xfs_fsblock_t abno; /* allocated block number */ xfs_extlen_t alen; /* allocated extent length */ xfs_fileoff_t aoff; /* allocated file offset */ - xfs_bmalloca_t bma; /* args for xfs_bmap_alloc */ + xfs_bmalloca_t bma = { 0 }; /* args for xfs_bmap_alloc */ xfs_btree_cur_t *cur; /* bmap btree cursor */ xfs_fileoff_t end; /* end of mapped file region */ int eof; /* we've hit the end of extents */ -- 1.6.5