Cppcheck: Reduction of False Positives: Manual Approach

Stephan Bergmann sbergman at redhat.com
Tue Oct 2 06:40:25 UTC 2018

On 02/10/2018 04:05, slacka wrote:
> There are many knobs I could tweak. For example, since my last post, I
> discovered I could remove the "-DNDEBUG" to scan the debug code path. I
> could also remove the "-j 4" option to allow Cppcheck to scan for unused
> functions.  I don't know what is most useful, and what valid issues were not
> being reported.  This is why I have asked the ML for feedback.

The knobs you can tweak are the configure options passed to LO's 
autogen.sh.  For example, -DNDEBUG is controlled by 
--en-/disable-assert-always-abort.  There is not per-se an "ideal" set 
of configure options for static analysis purposes.  One reasonable 
approach is of course to maximize code coverage, both at the large scale 
(enabling as many optional modules as possible, from e.g. --enable-kde5 
to --enable-ext-nlpsolver) and at small (e.g., enabling asserts with 
--enable-assert-always-abort or debug-only code blocks with 
--enable-debug or even --enable-dbgutil, both of which imply 

More information about the LibreOffice mailing list