Messages in this thread Patch in this message | | | Subject | [PATCH 2.6.2-rc1-mm3] fs/xfs/xfs_log_recover.c | Date | Sat, 24 Jan 2004 20:48:59 -0800 (PST) | From | (Bryan Whitehead) |
| |
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@megahappy.net - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |