From: James Simmons Date: Sun, 29 Jan 2017 00:05:23 +0000 (-0500) Subject: staging: lustre: obd: move s3 in lmd_parse to inner loop X-Git-Tag: v4.11-rc1~116^2~152 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=62898c2d7efc1029d77b5fabe968871524f0297c;p=karo-tx-linux.git staging: lustre: obd: move s3 in lmd_parse to inner loop Building the lustre client with W=1 reports the following error: 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. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8378 Reviewed-on: https://review.whamcloud.com/23820 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c index 2283e920d839..8e0d4b1d86dc 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c @@ -877,7 +877,7 @@ static int lmd_parse_mgs(struct lustre_mount_data *lmd, char **ptr) */ 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; @@ -906,6 +906,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 == ',')