Nothing to complain about. Instead, I got a BRACEPOS warning.
It excludes an opening brace if the line directly above it is a preprocessor directive starting with #. It should probably also exclude an opening brace if every line starting with the second one above ends with a \ until one starts with a #? I don't know how to nicely express that in perl though...
I believe the right approach is to filter away preprocessor directives before the code is checked. But then we still need to allow certain "bending of the rules" when there are preprocessor instructions mixed with code...
I have a fix that I believe works at least for this case, but when working on this I also started to feel the need to add dedicated tests for checksrc so that we know that fixing a problem doesn't break old behavior or introduced new bugs... But I realize I need to put "checksrc tests" as a separate item/PR...
In order to check the actual code better, checksrc now ignores
everything that look like preprocessor instructions.
Note that some rules then still don't need to be followed when code is
exactly below a cpp instruction.
Reported-by: Marcel Raad