diff options
author | James E Keenan <jkeenan@cpan.org> | 2019-11-08 10:17:50 -0500 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2019-11-12 19:50:59 +0000 |
commit | 35bc1e35279523a59fee1761d7505ff5c04638c0 (patch) | |
tree | 2f4a788c40bd59c3c28fc2e2ef6fc646db67cb9a /mg.c | |
parent | ecfd8588da8b6d2b74d6476d4d1c9e40c7de8b8c (diff) | |
download | perl-35bc1e35279523a59fee1761d7505ff5c04638c0.tar.gz |
Fix: local variable hiding parameter of same name
LGTM provides static code analysis and recommendations for code quality
improvements. Their recent run over the Perl 5 core distribution
identified 12 instances where a local variable hid a parameter of
the same name in an outer scope. The LGTM rule governing this situation
can be found here:
Per: https://lgtm.com/rules/2156240606/
This patch renames local variables in approximately 8 of those instances
to comply with the LGTM recommendation. Suggestions for renamed
variables were made by Tony Cook.
For: https://github.com/Perl/perl5/pull/17281
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1933,8 +1933,8 @@ Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, va_start(args, argc); do { - SV *const sv = va_arg(args, SV *); - PUSHs(sv); + SV *const this_sv = va_arg(args, SV *); + PUSHs(this_sv); } while (--argc); va_end(args); |