From: James Simmons Date: Thu, 12 Jun 2014 21:27:26 +0000 (-0400) Subject: LU-4629 obdclass: compile issues with variable not being initialized X-Git-Tag: 2.6.0-RC1~85 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ee872ea24e7714af5828db65a44ea3f17a7645a7;p=fs%2Flustre-release.git 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 --- 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;