summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2019-11-08 10:17:50 -0500
committerJames E Keenan <jkeenan@cpan.org>2019-11-12 19:50:59 +0000
commit35bc1e35279523a59fee1761d7505ff5c04638c0 (patch)
tree2f4a788c40bd59c3c28fc2e2ef6fc646db67cb9a /mg.c
parentecfd8588da8b6d2b74d6476d4d1c9e40c7de8b8c (diff)
downloadperl-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 7d2314fd64..295ffc63d3 100644
--- a/mg.c
+++ b/mg.c
@@ -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);