From: James Simmons Date: Sat, 17 Dec 2016 17:18:28 +0000 (-0500) Subject: LU-8378 obd: move s3 in lmd_parse to inner loop X-Git-Tag: 2.9.52~47 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6867d7abdb9905da98d8e90b8dc65d84a7656363;ds=sidebyside LU-8378 obd: move s3 in lmd_parse to inner loop The upstream client complains with: obdclass/obd_mount.c: In function lmd_parse: obdclass/obd_mount.c:880: warning: variable set but not used The solution is to move s3 to the inner loop where it is only used. Test-Parameters: trivial Change-Id: I95280d08e5f00cf5fdae62acb21e2c08805a9948 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/23820 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Jinshan Xiong --- diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 4869da4..ab7b6ba 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1158,7 +1158,7 @@ static int lmd_parse_nidlist(char *buf, char **endh) */ static int lmd_parse(char *options, struct lustre_mount_data *lmd) { - char *s1, *s2, *s3, *devname = NULL; + char *s1, *s2, *devname = NULL; struct lustre_mount_data *raw = (struct lustre_mount_data *)options; int rc = 0; ENTRY; @@ -1190,6 +1190,7 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd) while (*s1) { int clear = 0; int time_min = OBD_RECOVERY_TIME_MIN; + char *s3; /* Skip whitespace and extra commas */ while (*s1 == ' ' || *s1 == ',')