xfs
[Top] [All Lists]

[PATCH] XFS: remove warning in xfs_log_recover, 2.6.2-rc2

To: linux-xfs@xxxxxxxxxxx
Subject: [PATCH] XFS: remove warning in xfs_log_recover, 2.6.2-rc2
From: Michael Veeck <michael.veeck@xxxxxxx>
Date: Tue, 27 Jan 2004 15:15:40 +0100
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114
Compiling the 2.6.2-rc2 kernel on my machine with allyesconfig and gcc
3.3.1 triggers the following warning:

   CC      fs/xfs/xfs_log_recover.o
fs/xfs/xfs_log_recover.c: In function `xlog_recover_reorder_trans':
fs/xfs/xfs_log_recover.c:1534: warning: `flags' might be used
uninitialized in this function

I've added an "= 0" to the appropiate line which lets it cleanly compile
now. Attached patch fixes the warning and is against 2.6.2-rc2. Apply
with patch -p1 < patch-XFSwarning.

The patch was also send to the LinuxKernelList and to owner-xfs@xxxxxxxxxxxx But the latter (from the MAINTAINER-file) doesnt seem to be valid anymore?

Best regards
Michael Veeck

diff -Naur a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
--- old/fs/xfs/xfs_log_recover.c        2004-01-27 14:28:03.000000000 +0100
+++ new/fs/xfs/xfs_log_recover.c        2004-01-27 14:02:25.000000000 +0100
@@ -1531,7 +1531,7 @@
        xlog_recover_item_t     *first_item, *itemq, *itemq_next;
        xfs_buf_log_format_t    *buf_f;
        xfs_buf_log_format_v1_t *obuf_f;
-       ushort                  flags;
+       ushort                  flags = 0;
 
        first_item = itemq = trans->r_itemq;
        trans->r_itemq = NULL;

[PATCH] xfs has uninitialized flags-variable in xfs_log_recover. init it to 0. 
from michael.veeck@xxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] XFS: remove warning in xfs_log_recover, 2.6.2-rc2, Michael Veeck <=