diff options
author | Tony Cook <tony@develop-help.com> | 2022-07-12 10:37:30 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2022-08-08 15:15:02 +1000 |
commit | 90eef0af06f8dd17dd39a5ed9827264ff5b6b981 (patch) | |
tree | f153058eb8fd9425b23e5e0420ffcf8a3ef2e95d | |
parent | a577a1f18e7562749b5949934cacb911a1551dbd (diff) | |
download | perl-90eef0af06f8dd17dd39a5ed9827264ff5b6b981.tar.gz |
explicitly ignore the result of sv_utf8_downgrade()
Coverity complains about this because most other calls are
checked.
CIDs 353483, 353003, 353000, 352998, 352995
-rw-r--r-- | mathoms.c | 2 | ||||
-rw-r--r-- | mg.c | 2 | ||||
-rw-r--r-- | pp.c | 4 | ||||
-rw-r--r-- | sv.c | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -344,7 +344,7 @@ Perl_sv_pvbyte(pTHX_ SV *sv) { PERL_ARGS_ASSERT_SV_PVBYTE; - sv_utf8_downgrade(sv, FALSE); + (void)sv_utf8_downgrade(sv, FALSE); return sv_pv(sv); } @@ -1264,7 +1264,7 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) /* defined environment variables are byte strings; unfortunately there is no SvPVbyte_force_nomg(), so we must do this piecewise */ (void)SvPV_force_nomg_nolen(sv); - sv_utf8_downgrade(sv, /* fail_ok */ TRUE); + (void)sv_utf8_downgrade(sv, /* fail_ok */ TRUE); if (SvUTF8(sv)) { Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8), "Wide character in %s", "setenv"); SvUTF8_off(sv); @@ -3099,7 +3099,7 @@ PP(pp_oct) SV* const tsv = sv_2mortal(newSVsv(sv)); SvUTF8_on(tsv); - sv_utf8_downgrade(tsv, FALSE); + (void)sv_utf8_downgrade(tsv, FALSE); tmps = SvPV_const(tsv, len); } if (PL_op->op_type == OP_HEX) @@ -3689,7 +3689,7 @@ PP(pp_crypt) * Yes, we made this up. */ SV* const tsv = newSVpvn_flags(tmps, len, SVf_UTF8|SVs_TEMP); - sv_utf8_downgrade(tsv, FALSE); + (void)sv_utf8_downgrade(tsv, FALSE); tmps = SvPV_const(tsv, len); } # ifdef USE_ITHREADS @@ -10299,7 +10299,7 @@ Perl_sv_pvbyten_force(pTHX_ SV *const sv, STRLEN *const lp) PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE; sv_pvn_force(sv,lp); - sv_utf8_downgrade(sv,0); + (void)sv_utf8_downgrade(sv,0); *lp = SvCUR(sv); return SvPVX(sv); } |