Cppcheck: Reduction of False Positives: Manual Approach

Mike Kaganski mike.kaganski at collabora.com
Thu Sep 13 06:20:28 UTC 2018


Hi!

On 9/13/2018 8:59 AM, Luke Benes wrote:
> By manually specifying  includes and preprocessor configurations, I was able to reduce the number of warning from ~9000 to 30.

Great!

> Ideally, the next step would be to extract the "DEFS": and "INCLUDE": from gbuild-to-ide and pass that to cppcheck. But that's for another time.

 > dbaccess/source/shared/registrationhelper.cxx
 > 23    preprocessorErrorDirective        error    #error "don't build 
this file directly! use dbu_reghelper.cxx instead!"

This one is because a .cxx file was processed directly. The 
workdir/GbuildToJson/Library/dbulo.dll does contain 
dbaccess/source/shared/dbu_reghelper in its CXXOBJECTS, but no entry for 
dbaccess/source/shared/registrationhelper. So extracting this 
information seems helpful, too, to reduce false positives (OTOH I wonder 
what this inclusion technique is useful here for.)

-- 
Best regards,
Mike Kaganski


More information about the LibreOffice mailing list