summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2021-09-13 23:35:14 +0000
committerJames E Keenan <jkeenan@cpan.org>2021-09-16 11:52:53 +0000
commitac01b27e9431d47d678f96cbf48ae563ab075015 (patch)
tree1896826e37b5abe70edf2e422d003c8fb9579289
parentf15a20bce3aaf0956e466389530be470aa2cabfe (diff)
downloadperl-ac01b27e9431d47d678f96cbf48ae563ab075015.tar.gz
g++10 -Wparentheses build-time warnings
Two build-time warnings appeared when building with g++10 as compared with g++9. Both were: "suggest parentheses around assignment used as truth value"
-rw-r--r--gv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index ec96441dad..4e01aa1142 100644
--- a/gv.c
+++ b/gv.c
@@ -3290,14 +3290,14 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
case inc_amg:
force_cpy = 1;
if ((cv = cvp[off=add_ass_amg])
- || ((cv = cvp[off = add_amg]) && (force_cpy = 0, postpr = 1))) {
+ || ((cv = cvp[off = add_amg]) && (force_cpy = 0, (postpr = 1)))) {
right = &PL_sv_yes; lr = -1; assign = 1;
}
break;
case dec_amg:
force_cpy = 1;
if ((cv = cvp[off = subtr_ass_amg])
- || ((cv = cvp[off = subtr_amg]) && (force_cpy = 0, postpr=1))) {
+ || ((cv = cvp[off = subtr_amg]) && (force_cpy = 0, (postpr=1)))) {
right = &PL_sv_yes; lr = -1; assign = 1;
}
break;