[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2.6.2-rc1-mm3] fs/xfs/xfs_log_recover.c


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/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: