← Back to team overview

kicad-developers team mailing list archive

Re: Merging 3d_initial_merge branch.

 

Hi all,

Thanks for the ccpcheck suggestion JP, that was something I was looking for some time...
(I found already a bug with that!)

"There are still quite a few "variable not used" warnings but those
are in code contributed by Mario so I have left them alone for now."

I am running this also in my branch and found that issues.
I am not sure why but they are false positives, I guess it is the way the structures are constructed, example:

GLM_ALIGNED_STRUCT(CLASS_ALIGNMENT) RAY

is uses a define GLM_ALIGNED_STRUCT from GLM library.
probably cppcheck is not able to resolve this define in a proper way.

Any suggestions?

Mario

________________________________________
From: Kicad-developers [kicad-developers-bounces+mrluzeiro=ua.pt@xxxxxxxxxxxxxxxxxxx] on behalf of Cirilo Bernardo [cirilo.bernardo@xxxxxxxxx]
Sent: 05 April 2016 11:45
To: jp charras
Cc: KiCad Developers
Subject: Re: [Kicad-developers] Merging 3d_initial_merge branch.

Hi Jean-Pierre, Wayne,

 I've run cppcheck and fixed a number of issues:
1. ensured "delete [] X" where "delete X" was accidentally used
2. ensured variable initialization
3. fixed a number of errors and warnings reported by cppcheck
(most of those warnings were in fact errors)

There are still quite a few "variable not used" warnings but those
are in code contributed by Mario so I have left them alone for now.

cppcheck reports a number of "(error, inconclusive)" but I have
checked to make sure that those are in fact not errors and that
the program has actually performed appropriate checks.

All changes have been committed to r6558.  I hope all goes
smoothly and we can start to get more feedback on this new
3D plugin system.

- Cirilo


On Tue, Apr 5, 2016 at 6:02 PM, jp charras <jp.charras@xxxxxxxxxx<mailto:jp.charras@xxxxxxxxxx>> wrote:
Hi, Cirilo.

We (Wayne and me) are willing to merge your 3d_initial_merge branch.

It looks good for now, and adds very good features.

Could you run cppcheck on you code (the 3d-viewer and others new folders)?
(see http://cppcheck.sourceforge.net)
cppcheck is fast, very easy to install and use (just run cppcheck on a given folder).

It is no as powerful as Coverity, but it is very helpful especially for a first basic analysis
before Coverity is run.

Especially, not initialized members and 3 errors (I am thinking related to "delete" versus
"delete[]") must be fixed (but some others could be fixed).
not initialized members create a lot of warning with Coverity, and are potential issues, so I am
thinking initializing them is good, even when it is not really needed.

Also there are some not used variables detected by the compiler.

Thanks for your work.

--
Jean-Pierre CHARRAS



Follow ups

References