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

resolve #1 - fix warnings new since perl 5.21.2 #2

Merged
merged 1 commit into from Nov 18, 2015

Conversation

Projects
None yet
2 participants
@leejo
Contributor

leejo commented Jan 1, 2015

Redundant argument in %s - this is because the various calls to the
sprintf function offset the arrays by 1 (since the first element of
the array is the sprintf string) but use @_ (the number of elements
in the array) in the range: 1 .. @_

since it's offset by 1 we are going beyond the end of the array and
so sprintf consequently warns that we sent more arguments than it
expected. fix this by using @_ -1 in the range (number of elements
in the array minus 1)

resolve #1 - fix warnings new since perl 5.21.2
Redundant argument in %s - this is because the various calls to the
sprintf function offset the arrays by 1 (since the first element of
the array is the sprintf string) but use @_ (the number of elements
in the array) in the range: 1 .. @_

since it's offset by 1 we are going beyond the end of the array and
so sprintf consequently warns that we sent more arguments than it
expected. fix this by using @_ -1 in the range (number of elements
in the array minus 1)

dex4er added a commit that referenced this pull request Nov 18, 2015

Merge pull request #2 from leejo/gh/issue_1
Fix "Redundant argument in sprintf" warning for Perl 5.21.2

@dex4er dex4er merged commit 92d969c into dex4er:master Nov 18, 2015

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