xfs-masters
[Top] [All Lists]

[PATCH] work around warning in fs/xfs/xfs_rtalloc.c

Subject: [PATCH] work around warning in fs/xfs/xfs_rtalloc.c
From: Ingo Molnar <mingo@xxxxxxx>
Date: Mon, 18 Aug 2008 15:21:19 +0200
fix warning:

  fs/xfs/xfs_rtalloc.c: In function âxfs_growfs_rtâ:
  fs/xfs/xfs_rtalloc.c:1875: warning: âtpâ may be used uninitialized in 
this function

This is a spurious gcc warning - it does not realize the correct/bug-free
flow of logic regarding the 'error' and 'tp' variables.

No code changed:
   7c10fd959065115c8e252ff5a861a01e  xfs_rtalloc.o.before.asm
   7c10fd959065115c8e252ff5a861a01e  xfs_rtalloc.o.after.asm

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
 fs/xfs/xfs_rtalloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index e2f68de..fe5de08 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1872,7 +1872,7 @@ xfs_growfs_rt(
        xfs_extlen_t    rsumblocks;     /* current number of rt summary blks */
        xfs_sb_t        *sbp;           /* old superblock */
        xfs_fsblock_t   sumbno;         /* summary block number */
-       xfs_trans_t     *tp;            /* transaction pointer */
+       xfs_trans_t     *uninitialized_var(tp); /* transaction pointer */
 
        sbp = &mp->m_sb;
        cancelflags = 0;


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] work around warning in fs/xfs/xfs_rtalloc.c, Ingo Molnar <=