Whamcloud - gitweb
LU-8378 obd: move s3 in lmd_parse to inner loop 20/23820/4
authorJames Simmons <uja.ornl@yahoo.com>
Sat, 17 Dec 2016 17:18:28 +0000 (12:18 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 9 Jan 2017 05:49:53 +0000 (05:49 +0000)
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 <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23820
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
lustre/obdclass/obd_mount.c

index 4869da4..ab7b6ba 100644 (file)
@@ -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 == ',')