diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-22 20:44:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-22 23:59:53 +0200 |
commit | 8b1501d80dc9d3f42c351c6e026fa737e116cae5 (patch) | |
tree | b11535f8b8c147895a1323d443f66edd9cdc09ad /embedserv | |
parent | 98530f4dfe13fd379ab0c2d55b90914b6738dad9 (diff) |
Always disable loplugin:expressionalwayszero, to avoid false positives
bdade7e3fc33c1832c6f6a472443fca8238738d2 "tdf#105444 DOCX import: don't put
extra paragraphs in comments" caused
> /home/sbergman/lo2/core/writerfilter/source/dmapper/DomainMapper_Impl.cxx:441:22: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
> (sizeof(SAL_NEWLINE_STRING)-1 == 2 && xCursor->getString() == "\n"))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
now with sufficiently new Clang, and the code looks reasonable, and there's no
apparent way to avoid such false positives in the plugin. (It could check for a
sub-expression of the problematic expression being an object-like macro, but
SAL_NEWLINE_STRING could just as well be a variable instead of a macro. That
variable would need to be defined in some #if to have different values on
different platforms, so the plugin could theoretically check for such
conditional inclusion, but it's not clear whether that's worth it and would even
be a useful heuristic to not produce neither too many false positives nor too
many false negatives.) So just disable the plugin for good.
Change-Id: I85dc8573735ccac4e19be20ab7443cbaa85a3164
Reviewed-on: https://gerrit.libreoffice.org/60907
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embedserv')
0 files changed, 0 insertions, 0 deletions