On compile I get this:
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 previously sent this patch and it was wrong.
In the function xlog_recover_reorder_trans the comiler thinks that "flags" might be used uninitialized. This will never happen as the first switch statement takes care of giving flags a value for all CASE statements that will use the flags variable later in the function. To get rid of the warning, flags needs to start off with an initial value. The previous patch merged the 2 switch statements but that would have broken the XFS_LI_BUF case as flags would be overwritten in the XFS_LI_5_3_BUF case.
This patch keeps the same functionality but removes the warning the compiler generates.
--- fs/xfs/xfs_log_recover.c.orig 2004-01-24 20:16:15.726073560 -0800
+++ fs/xfs/xfs_log_recover.c 2004-01-24 20:33:02.720987064 -0800
@@ -1531,7 +1531,7 @@ xlog_recover_reorder_trans(
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;
--
Bryan Whitehead
driver _at_ megahappy.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: [PATCH 2.6.2-rc1-mm3] fs/xfs/xfs_log_recover.cTim Cambrant
- Re: [PATCH 2.6.2-rc1-mm3] fs/xfs/xfs_log_recover.cNathan Scott
- Prev by Date: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
- Next by Date: Re: 2.6.1 Unable to handle kernel paging request
- Previous by thread: Re: [PATCH] add_*_randomness calls in usbkbd.c and usbmouse.c
- Next by thread: Re: [PATCH 2.6.2-rc1-mm3] fs/xfs/xfs_log_recover.c
- Indexes:[Main][Thread]