From ee872ea24e7714af5828db65a44ea3f17a7645a7 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 12 Jun 2014 17:27:26 -0400 Subject: [PATCH 1/1] LU-4629 obdclass: compile issues with variable not being initialized One of the versions of gcc I have refuses to build obd_mount.c due to index not be initialized in function lmd_make_exclusion before it is used. Change-Id: Ib549e595492e647364441c5d96df86ec513ad6c6 Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/10705 Reviewed-by: John L. Hammond Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- lustre/obdclass/obd_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index b53ba84..bfa1c12 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -893,7 +893,8 @@ int lustre_check_exclusion(struct super_block *sb, char *svname) static int lmd_make_exclusion(struct lustre_mount_data *lmd, const char *ptr) { const char *s1 = ptr, *s2; - __u32 index, *exclude_list; + __u32 *exclude_list; + __u32 index = 0; int rc = 0, devmax; ENTRY; -- 1.8.3.1