[PATCH 1/9] staging/lustre/obdclass: fix false used uninitialized warning

From: Peng Tao
Date: Tue Dec 03 2013 - 09:51:22 EST


Got below warning when building lustre with 4.7.3.
drivers/staging/lustre/lustre/obdclass/llog_test.c: In function â
llog_test_initâ:
drivers/staging/lustre/lustre/obdclass/llog_test.c:1058:28: warning: â
lvars.module_varsâ is used uninitialized in this function
[-Wuninitialized]

Signed-off-by: Peng Tao <bergwolf@xxxxxxxxx>
Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
---
drivers/staging/lustre/lustre/obdclass/llog_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/llog_test.c b/drivers/staging/lustre/lustre/obdclass/llog_test.c
index 178f89e..7427c12 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_test.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_test.c
@@ -1048,7 +1048,7 @@ static struct obd_ops llog_obd_ops = {

static int __init llog_test_init(void)
{
- struct lprocfs_static_vars lvars;
+ struct lprocfs_static_vars uninitialized_var(lvars);

lprocfs_llog_test_init_vars(&lvars);
return class_register_type(&llog_obd_ops, NULL,
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/