Bug 1292954 - all: fix various errors/warnings reported by cppcheck
Summary: all: fix various errors/warnings reported by cppcheck
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kaleb KEITHLEY
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-18 20:18 UTC by Kaleb KEITHLEY
Modified: 2016-06-16 13:51 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 13:51:17 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kaleb KEITHLEY 2015-12-18 20:18:50 UTC
Description of problem: cppcheck reports errors


Version-Release number of selected component (if applicable):


How reproducible: run cppcheck on source


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2015-12-18 20:25:46 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck errors and warnings) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 3 Kaleb KEITHLEY 2015-12-18 20:39:01 UTC
Which,when that link goes away:


[cli/src/cli-rpc-ops.c:2380]: (error) Possible null pointer dereference: local
[cli/src/cli-rpc-ops.c:2557]: (error) Possible null pointer dereference: local
[cli/src/cli-rpc-ops.c:7908]: (error) Possible null pointer dereference: local
[cli/src/cli-rpc-ops.c:7917]: (error) Possible null pointer dereference: local
[cli/src/cli.c:500]: (error) va_list 'ap' was opened but not closed by va_end().
[cli/src/cli.c:524]: (error) va_list 'ap' was opened but not closed by va_end().
[contrib/libexecinfo/execinfo.c:359]: (error) Memory leak: rval
[extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments.
[libglusterfs/src/event-epoll.c:117]: (error) Array 'event_pool.slots_used[1024]' accessed at index 1024, which is out of bounds.
[tests/basic/fops-sanity.c:63]: (error) Buffer overrun possible for long command line arguments.
[tests/bugs/replicate/bug-1250170-fsync.c:39]: (error) Memory leak: buffer
[xlators/cluster/dht/src/dht-rename.c:961]: (error) Possible null pointer dereference: local
[xlators/debug/io-stats/src/io-stats.c:681]: (error) Array 'entry.iosstat.thru_counters[2]' accessed at index 3, which is out of bounds.
[xlators/features/bit-rot/src/bitd/bit-rot.c:1697]: (error) va_list 'ap' was opened but not closed by va_end().
[xlators/mgmt/glusterd/src/glusterd-handler.c:2231]: (error) Possible null pointer dereference: this
[xlators/mgmt/glusterd/src/glusterd-handler.c:2874]: (error) Possible null pointer dereference: this
[xlators/mgmt/glusterd/src/glusterd-snapshot.c:6201]: (error) Possible null pointer dereference: volinfo
[xlators/mount/fuse/src/fuse-helpers.c:254]: (error) Resource leak: fp
[xlators/storage/posix/src/posix-helpers.c:1118]: (error) Invalid number of character '{' when these macros are defined: 'GF_DARWIN_HOST_OS'.

Comment 4 Vijay Bellur 2015-12-19 01:18:57 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck errors and warnings) posted (#2) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 5 Vijay Bellur 2015-12-22 22:23:26 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck warnings) posted (#3) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 6 Vijay Bellur 2015-12-22 22:41:49 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck warnings) posted (#4) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 7 Vijay Bellur 2015-12-23 11:04:47 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck warnings) posted (#5) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 8 Vijay Bellur 2016-02-05 16:03:03 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck warnings) posted (#6) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 9 Vijay Bellur 2016-02-11 13:08:09 UTC
REVIEW: http://review.gluster.org/13006 (all: fix various cppcheck warnings) posted (#7) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 10 Vijay Bellur 2016-02-15 09:36:13 UTC
COMMIT: http://review.gluster.org/13006 committed in master by Kaleb KEITHLEY (kkeithle) 
------
commit 62f9659554c07317c9d06251b74171d9eac0917e
Author: Kaleb S KEITHLEY <kkeithle>
Date:   Fri Dec 18 15:21:27 2015 -0500

    all: fix various cppcheck warnings
    
    fixes for various warnings reported by cppcheck
    
    N.B. cppcheck output is in the bugzilla
    
    Change-Id: I33acec127bc4536935fdd8d52a0c490ec54d50b2
    BUG: 1292954
    Signed-off-by: Kaleb S KEITHLEY <kkeithle>
    Reviewed-on: http://review.gluster.org/13006
    Reviewed-by: Jeff Darcy <jdarcy>
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 11 Niels de Vos 2016-06-16 13:51:17 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.