After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720306 - cppcheck warnings, plus some fixes.
cppcheck warnings, plus some fixes.
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-12-12 08:10 UTC by Mario Rugiero
Modified: 2013-12-13 02:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cppcheck log. (133.59 KB, text/x-log)
2013-12-12 08:10 UTC, Mario Rugiero
  Details
Patch fixing most memory errors unveiled by cppcheck. (11.04 KB, patch)
2013-12-12 08:11 UTC, Mario Rugiero
none Details | Review

Description Mario Rugiero 2013-12-12 08:10:50 UTC
Created attachment 264044 [details]
cppcheck log.

I ran cppcheck over all of the code base (recently pulled from git), enabling everything. After it was ready, I fixed almost all of the memory related warnings, for which I provide a patch.
Fixed warnings have been removed from the log.
Comment 1 Mario Rugiero 2013-12-12 08:11:27 UTC
Created attachment 264045 [details] [review]
Patch fixing most memory errors unveiled by cppcheck.
Comment 2 Morten Welinder 2013-12-13 02:00:53 UTC
Thanks.  I have applied the patch, except as follows:



src/cellspan.c: not needed

src/commands.c: cppcheck is confused

src/dialogs/dialog-doc-metadata.c: patch lacks bracket, but cppcheck is
just confused.

src/sf-bessel.c: patch lacks braces.

plugins/excel/ms-obj.c: I think freeing "anchor" would be wrong.


This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.