This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Missing breaks.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 24 Jun 2015 22:45:16 +0000 (18:45 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 27 Jun 2015 03:09:48 +0000 (23:09 -0400)
Coverity CIDs 118700 and 118701.

sv.c

diff --git a/sv.c b/sv.c
index 8a9a9ff..e27b56c 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1679,6 +1679,7 @@ Perl_sv_setiv(pTHX_ SV *const sv, const IV i)
        /* diag_listed_as: Can't coerce %s to %s in %s */
        Perl_croak(aTHX_ "Can't coerce %s to integer in %s", sv_reftype(sv,0),
                   OP_DESC(PL_op));
+        break;
     default: NOOP;
     }
     (void)SvIOK_only(sv);                      /* validate number */
@@ -1790,6 +1791,7 @@ Perl_sv_setnv(pTHX_ SV *const sv, const NV num)
        /* diag_listed_as: Can't coerce %s to %s in %s */
        Perl_croak(aTHX_ "Can't coerce %s to number in %s", sv_reftype(sv,0),
                   OP_DESC(PL_op));
+        break;
     default: NOOP;
     }
     SvNV_set(sv, num);