New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checksrc: handle zero scoped ignore commands #3096

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@danielgustafsson
Member

danielgustafsson commented Oct 4, 2018

If a !checksrc! disable command specified to ignore zero errors, it was still added to the ignore block even though nothing was ignored. While there were no blocks ignored that shouldn't be ignored, the processing ended with with a warning.

<filename>:<line>:<col>: warning: Unused ignore: LONGLINE (UNUSEDIGNORE)
 /* !checksrc! disable LONGLINE 0 */
                    ^

Fix by instead treating a zero ignore as a a bad command and throw a warning for that one.

checksrc: handle zero scoped ignore commands
If a !checksrc! disable command specified to ignore zero errors, it was
still added to the ignore block even though nothing was ignored. While
there were no blocks ignored that shouldn't be ignored, the processing
ended with with a warning. Fix by instead treating a zero ignore as a
a badcommand and throw a warning for that one.

<filename>:<line>:<col>: warning: Unused ignore: LONGLINE (UNUSEDIGNORE)
 /* !checksrc! disable LONGLINE 0 */
                    ^
@bagder

bagder approved these changes Oct 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment