Skip to content

Commit 90eef0a

Browse files
committed
explicitly ignore the result of sv_utf8_downgrade()
Coverity complains about this because most other calls are checked. CIDs 353483, 353003, 353000, 352998, 352995
1 parent a577a1f commit 90eef0a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

mathoms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Perl_sv_pvbyte(pTHX_ SV *sv)
344344
{
345345
PERL_ARGS_ASSERT_SV_PVBYTE;
346346

347-
sv_utf8_downgrade(sv, FALSE);
347+
(void)sv_utf8_downgrade(sv, FALSE);
348348
return sv_pv(sv);
349349
}
350350

mg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg)
12641264
/* defined environment variables are byte strings; unfortunately
12651265
there is no SvPVbyte_force_nomg(), so we must do this piecewise */
12661266
(void)SvPV_force_nomg_nolen(sv);
1267-
sv_utf8_downgrade(sv, /* fail_ok */ TRUE);
1267+
(void)sv_utf8_downgrade(sv, /* fail_ok */ TRUE);
12681268
if (SvUTF8(sv)) {
12691269
Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8), "Wide character in %s", "setenv");
12701270
SvUTF8_off(sv);

pp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,7 +3099,7 @@ PP(pp_oct)
30993099
SV* const tsv = sv_2mortal(newSVsv(sv));
31003100

31013101
SvUTF8_on(tsv);
3102-
sv_utf8_downgrade(tsv, FALSE);
3102+
(void)sv_utf8_downgrade(tsv, FALSE);
31033103
tmps = SvPV_const(tsv, len);
31043104
}
31053105
if (PL_op->op_type == OP_HEX)
@@ -3689,7 +3689,7 @@ PP(pp_crypt)
36893689
* Yes, we made this up. */
36903690
SV* const tsv = newSVpvn_flags(tmps, len, SVf_UTF8|SVs_TEMP);
36913691

3692-
sv_utf8_downgrade(tsv, FALSE);
3692+
(void)sv_utf8_downgrade(tsv, FALSE);
36933693
tmps = SvPV_const(tsv, len);
36943694
}
36953695
# ifdef USE_ITHREADS

sv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10299,7 +10299,7 @@ Perl_sv_pvbyten_force(pTHX_ SV *const sv, STRLEN *const lp)
1029910299
PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE;
1030010300

1030110301
sv_pvn_force(sv,lp);
10302-
sv_utf8_downgrade(sv,0);
10302+
(void)sv_utf8_downgrade(sv,0);
1030310303
*lp = SvCUR(sv);
1030410304
return SvPVX(sv);
1030510305
}

0 commit comments

Comments
 (0)