Skip to content

checksrc: enable strict mode and warnings#3090

Closed
danielgustafsson wants to merge 1 commit intocurl:masterfrom
danielgustafsson:dg-checksrc_strict
Closed

checksrc: enable strict mode and warnings#3090
danielgustafsson wants to merge 1 commit intocurl:masterfrom
danielgustafsson:dg-checksrc_strict

Conversation

@danielgustafsson
Copy link
Copy Markdown
Member

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.

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.
@lock lock bot locked as resolved and limited conversation to collaborators Jan 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants