← Back to team overview

kicad-developers team mailing list archive

Re: Merging 3d_initial_merge branch.

 

Hello. Look at gcc option "-fsanitize=" too.  
![](https://link.nylas.com/open/ac7n0u7eu8cj6vjow9ajimqdr/58d3f403faeb4e22ac36
f827cb89bd7d)

> On апр 5 2016, at 2:45 дня, jp charras <jp.charras@xxxxxxxxxx> wrote:  

>

> Le 05/04/2016 13:23, Mário Luzeiro a écrit :  
> 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

>

>  
Cppcheck, like all static analyzers, is useful to find some errors and
mistakes.

>

> However, it is not usually possible (and perhaps not good) to fix all
"errors" find by a static  
analyzer.  
There are always false positive or issues detected by the detected which
cannot really happen due to  
the logic of the code.

>

> Just, be sure remaining errors or warnings are acceptable (false positive),  
and actual errors and warnings are fixed.

>

> >  
> ________________________________________  
> 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)?  
&gt; (see <http://cppcheck.sourceforge.net)>  
&gt; cppcheck is fast, very easy to install and use (just run cppcheck on a
given folder).  
&gt;  
&gt; It is no as powerful as Coverity, but it is very helpful especially for a
first basic analysis  
&gt; before Coverity is run.  
&gt;  
&gt; Especially, not initialized members and 3 errors (I am thinking related
to "delete" versus  
&gt; "delete[]") must be fixed (but some others could be fixed).  
&gt; not initialized members create a lot of warning with Coverity, and are
potential issues, so I am  
&gt; thinking initializing them is good, even when it is not really needed.  
&gt;  
&gt; Also there are some not used variables detected by the compiler.  
&gt;  
&gt; Thanks for your work.  
&gt;  
&gt; \--  
&gt; Jean-Pierre CHARRAS

>

>  
\--  
Jean-Pierre CHARRAS

>

> _______________________________________________  
Mailing list: https://launchpad.net/~kicad-developers  
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx  
Unsubscribe : https://launchpad.net/~kicad-developers  
More help : https://help.launchpad.net/ListHelp


References