[Bugs] [Bug 1310755] New: glusterd: coverity warning in glusterd-snapshot-utils.c copy_nfs_ganesha_file()
bugzilla at redhat.com
bugzilla at redhat.com
Mon Feb 22 15:42:32 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1310755
Bug ID: 1310755
Summary: glusterd: coverity warning in
glusterd-snapshot-utils.c copy_nfs_ganesha_file()
Product: GlusterFS
Version: mainline
Component: glusterd
Assignee: bugs at gluster.org
Reporter: kkeithle at redhat.com
CC: bugs at gluster.org
Description of problem:
coverity warning
Version-Release number of selected component (if applicable):
mainline, 3.7.x
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
> ** CID 1351702: Code maintainability issues (UNUSED_VALUE)
> /data/workspace/gluster/glusterfs/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c: 3695 in glusterd_copy_nfs_ganesha_file()
>
>
> ________________________________________________________________________________________________________
> *** CID 1351702: Code maintainability issues (UNUSED_VALUE)
> /data/workspace/gluster/glusterfs/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c: 3695 in glusterd_copy_nfs_ganesha_file()
> 3689
> 3690 GF_VALIDATE_OR_GOTO (this->name, src_vol, out);
> 3691 GF_VALIDATE_OR_GOTO (this->name, dest_vol, out);
> 3692
> 3693 if (src_vol->is_snap_volume) {
> 3694 GLUSTERD_GET_SNAP_DIR (snap_dir, src_vol->snapshot, priv);
>>>> CID 1351702: Code maintainability issues (UNUSED_VALUE)
>>>> Assigning value from "snprintf(src_path, 4096UL, "%s/export.%s.conf", snap_dir, src_vol->snapshot->snapname)" to "ret" here, but that stored value is overwritten before it can be used.
> 3695 ret = snprintf (src_path, sizeof (src_path),
> 3696 "%s/export.%s.conf", snap_dir,
> 3697 src_vol->snapshot->snapname);
> 3698 } else {
> 3699 ret = snprintf (src_path, sizeof (src_path),
> 3700 "%s/export.%s.conf", GANESHA_EXPORT_DIRECTORY,
...
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list