lkml.org 
[lkml]   [2004]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] XFS: remove warning in xfs_log_recover, 2.6.2-rc2
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.

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@gmx.net
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.024 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site