This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add NOT_REACHED to quiet clang -Weverything warnings
authorAndy Lester <andy@petdance.com>
Mon, 27 Feb 2017 03:15:46 +0000 (21:15 -0600)
committerJames E Keenan <jkeenan@cpan.org>
Thu, 1 Jun 2017 15:03:27 +0000 (11:03 -0400)
gv.c
sv.c

diff --git a/gv.c b/gv.c
index 315ec49..81fa5de 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -385,6 +385,7 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, U32 flag
        case SVt_PVIO:
             Perl_croak(aTHX_ "Cannot convert a reference to %s to typeglob",
                       sv_reftype(has_constant, 0));
+            NOT_REACHED; /* NOTREACHED */
             break;
 
        default: NOOP;
diff --git a/sv.c b/sv.c
index 19bd254..db51175 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1651,6 +1651,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));
+        NOT_REACHED; /* NOTREACHED */
         break;
     default: NOOP;
     }
@@ -1763,6 +1764,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));
+        NOT_REACHED; /* NOTREACHED */
         break;
     default: NOOP;
     }
@@ -13884,6 +13886,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
            switch (sv_type) {
            default:
                Perl_croak(aTHX_ "Bizarre SvTYPE [%" IVdf "]", (IV)SvTYPE(sstr));
+                NOT_REACHED; /* NOTREACHED */
                break;
 
            case SVt_PVGV: