Skip to content

ci: Make false-positive patterns match a single warning

Otherwise, it's possible for a pattern to correspond to several warnings, not all of which are false positives. By adding sufficiently precise patterns as indicated in the comments, this is unlikely, but not impossible.

In the case of this pattern, for example, currently present in xfce4-panel:

tasklist-widget.c:[0-9]+:[0-9]+: warning: dereference of NULL 'child' \[CWE-476\] \[-Wanalyzer-null-dereference\]

the 'child' variable has enough occurrences in the tasklist-widget.c file that the risk of a multiple match cannot be ruled out.

The simplest way to specify a multiple match seems to be to add the pattern several times, instead of specifying the number of matches, which would require additional parsing with a delimiter.

Amends: 8bf2175d

Edited by Gaël Bonithon

Merge request reports