summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2020-08-28 11:00:28 +0100
committerDavid Mitchell <davem@iabyn.com>2020-08-28 11:00:28 +0100
commitd966075ef138f83ebc62a865b153d87ea5330f94 (patch)
treebed362f9824b7f1e81f13e1857ce86fa7a94d76a /pp_hot.c
parent76b30116a06bc8a696b5e190e9ead371cba34ecb (diff)
downloadperl-d966075ef138f83ebc62a865b153d87ea5330f94.tar.gz
pp_multiconcat(): tweak a const
Remove a bit of a hack done by me 2 years ago to shut up a compiler warning which did a cast to RW of a constant string. Since the field which the const string is assigned to is never modified, just make that field const instead.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 7faa1a9c08..0f5e4170a5 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -417,7 +417,7 @@ PP(pp_multiconcat)
for ease of testing and setting) */
/* for each arg, holds the result of an SvPV() call */
struct multiconcat_svpv {
- char *pv;
+ const char *pv;
SSize_t len;
}
*targ_chain, /* chain of slots where targ has appeared on RHS */
@@ -533,7 +533,7 @@ PP(pp_multiconcat)
/* an undef value in the presence of warnings may trigger
* side affects */
goto do_magical;
- svpv_end->pv = (char*)"";
+ svpv_end->pv = "";
len = 0;
}
else