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: enable strict mode and warnings #3090

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@danielgustafsson
Member

danielgustafsson commented Oct 4, 2018

Enable strict and warnings mode for checksrc.pl to ensure we aren't missing anything due to bugs in the checking code. This uncovered a few things which are all fixed in this commit:

  • several variables were used uninitialized
  • several variables were not defined in the correct scope
  • the whitelist filehandle was read even if the file didn't exist
  • the enable_warn() call when a disable counter had expired was passing incorrect variables, but since the checkwarn() call is unlikely to hit (the counter is only decremented to zero on actual ignores) it didn't manifest a problem.
checksrc: enable strict mode and warnings
Enable strict and warnings mode for checksrc to ensure we aren't missing
anything due to bugs in the checking code. This uncovered a few things
which are all fixed in this commit:

* several variables were used uninitialized
* several variables were not defined in the correct scope
* the whitelist filehandle was read even if the file didn't exist
* the enable_warn() call when a disable counter had expired was passing
  incorrect variables, but since the checkwarn() call is unlikely to hit
  (the counter is only decremented to zero on actual ignores) it didn't
  manifest a problem.
@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