[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH v3 01/12] automation/eclair: fix deviation of MISRA C Rule 16.3
Escape the final dot of the comment and extend the search of a fallthrough comment up to 2 lines after the last statement. Fixes: a128d8da913b ("automation/eclair: add deviations for MISRA C:2012 Rule 16.3") Reported-by: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- Changes in v3: - truncate to 12 digits. Changes in v2: - instead of introducing the hypened fallthrough, insert the missing escape. --- automation/eclair_analysis/ECLAIR/deviations.ecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index c8bff0e057..9b994be63d 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -416,7 +416,7 @@ safe." -doc_end -doc_begin="Switch clauses ending with an explicit comment indicating the fallthrough intention are safe." --config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through.? \\*/.*$,0..1))))"} +-config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through\\.? \\*/.*$,0..2))))"} -doc_end -doc_begin="Switch statements having a controlling expression of enum type deliberately do not have a default case: gcc -Wall enables -Wswitch which warns (and breaks the build as we use -Werror) if one of the enum labels is missing from the switch." -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |