'plock.cookie' might be used uninitialized in this function.
sscanf format specification '%d' expects type 'int *' for 'd',
but parameter 3 has a different type '__u32*'
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ie800e69f345e815dc7437b89707cbaabac1af5f7
Reviewed-on: http://review.whamcloud.com/9390
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
it->d.lustre.it_remote_lock_mode = it->d.lustre.it_lock_mode;
}
it->d.lustre.it_remote_lock_mode = it->d.lustre.it_lock_mode;
}
- it->d.lustre.it_lock_handle = plock.cookie;
- it->d.lustre.it_lock_mode = pmode;
+ if (pmode) {
+ it->d.lustre.it_lock_handle = plock.cookie;
+ it->d.lustre.it_lock_mode = pmode;
+ }
obd_str2uuid(&obd_uuid, lustre_cfg_buf(lcfg, 1));
obd_str2uuid(&obd_uuid, lustre_cfg_buf(lcfg, 1));
- if (sscanf(lustre_cfg_buf(lcfg, 2), "%d", &index) != 1)
+ if (sscanf(lustre_cfg_buf(lcfg, 2), "%u", &index) != 1)
GOTO(out, rc = -EINVAL);
if (sscanf(lustre_cfg_buf(lcfg, 3), "%d", &gen) != 1)
GOTO(out, rc = -EINVAL);
GOTO(out, rc = -EINVAL);
if (sscanf(lustre_cfg_buf(lcfg, 3), "%d", &gen) != 1)
GOTO(out, rc = -EINVAL);