[Kde-imaging] [Digikam-devel] Coverty Reports traces...

Michael G. Hansen mike at mghansen.de
Mon Feb 11 12:39:45 UTC 2013


On 02/05/2013 11:13 AM, Angelo Naselli wrote:
> Il 05/02/2013 11:06, Gilles Caulier ha scritto:
>> so why not to use it too...
>>
>> Note : I plan to buy a Coverity licence at work to parse all old code of
>> project managed in my office (where a lots of developers are left). I have
>> seen that Coverity is used in high level and critical process, as Nuclear
>> plan, Research center as CERN (to found Boson stuff), Bank, etc... It's
>> serious parser/analyser. And i can confirm that reports are sometimes very
>> instructive to found real bugs...
>
> Some rules can be also checked by compiler for instance -Weffc++ etc...
>
> Angelo

Yes, I think -Weffc++ reports all those "not initialized in constructor" 
warnings, too. But when I enable it for digikam, it also reports errors 
in all used libraries like Qt. In order to suppress these, we could add 
the library headers as system include directories, then warnings will be 
suppressed. I do not know if this can be done automatically now as a 
parameter to FindXXX in CMake, but I used to simply do this after all 
packages have been found in CMake:

# reset all include-directories as system-includes:
GET_DIRECTORY_PROPERTY(incdirs INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(INCLUDE_DIRECTORIES)
INCLUDE_DIRECTORIES(SYSTEM ${incdirs} ${CMAKE_CURRENT_BINARY_DIR})

Michael


More information about the Kde-imaging mailing list