← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] IDF code: fixing problems reported by coverity

 

Cirilo,

I committed your patch in the product branch r5425.  Thanks for the
quick response.  When you get a chance, please see if you can triage the
false positives you found.  You should be able to since I gave you
contributor/member privileges which according to the documentation
should allow to triage scan errors.  I don't really have the time to
triage everyone's scan errors.

Thanks,

Wayne

On 2/16/2015 3:46 AM, Cirilo Bernardo wrote:
> I have attached a patch to fix various problems reported by
> coverity and tested to ensure that the patches did not break
> the IDF exporter or idf2vrml tool. Here is a summary of
> reported issues, including items which are false positives:
> 
> FIXED:
> 
> FILE: idf_parser.cpp
> CID 102373 (#1 of 2): Resource leak (RESOURCE_LEAK)
> CID 102442 (#1 of 1): Logically dead code (DEADCODE)
> CID 102607 (#1 of 1): Use after free (USE_AFTER_FREE)
> CID 102729 (#1 of 1): Uninitialized scalar field
> 
> 
> FILE: idf_outlines.cpp
> CID 102413 (#1 of 1): Logically dead code (DEADCODE)
>     Comment: inadvertent assignment when comparison
>     intended ('=' rather than '==')
> CID 102828 (#1 of 1): Uninitialized scalar field
> (UNINIT_CTOR)
>     Comment: 'height' is unused, now deleted. However
>     the bug also exposed a defect in the standards
>     compliance which has now been fixed.
> 
> 
> FILE: idf_common.cpp
> CID 102220 (#2 of 2): Using invalid iterator
> (INVALIDATE_ITERATOR)
> 
> 
> FILE: vrml_layer.cpp
> CID 102555 (#2 of 2): Uninitialized scalar field
> (UNINIT_CTOR)
> 
> 
> FALSE POSITIVES:
> 
> FILE: idf_parser.cpp
> CID 102184 (#1 of 1): Unchecked return value
> CID 102198 (#1 of 1): Unchecked return value
> CID 102201 (#1 of 1): Unchecked return value
> CID 102210 (#1 of 1): Unchecked return value
> CID 102214 (#1 of 1): Unchecked return value
> 
> FILE: idf_outlines.cpp
> CID 102181 (#1 of 1): Unchecked return value
> CID 102655 (#2-1 of 2): Not restoring ostream format
> CID 102656 (#2-1 of 2): Not restoring ostream format
> CID 102793 (#2-1 of 2): Not restoring ostream format
> CID 102885 (#2-1 of 2): Not restoring ostream format
> 
> FILE: idf_common.cpp
> CID 102183 (#1 of 1): Unchecked return value
> CID 102191 (#1 of 1): Unchecked return value
> CID 102556 (#1 of 1): Uninitialized scalar field
> CID 102802 (#2-1 of 2): Not restoring ostream format
> 
> FILE: idf2vrml.cpp
> CID 102602 (#1 of 1): Not restoring ostream format
> 
> - Cirilo
> 
> 
> _______________________________________________
> 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
> 



Follow ups

References