In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/62d9081044ad53db012f71dbc7a968127804d169?hp=1eb7a0dec318d22fee300bd4348df9d7c80e2a2a>
- Log ----------------------------------------------------------------- commit 62d9081044ad53db012f71dbc7a968127804d169 Author: David Mitchell <[email protected]> Date: Mon Dec 5 12:47:42 2016 +0000 add some /* NOTREACHED */ The previous commit added some NOT_REACHED; but these days the correct voodoo is, apparently, NOT_REACHED; /* NOTREACHED */ to please as many compilers and static analysers as possible M op.c commit e9b8343fa465fe1f17441bfe1c1349ea013e9288 Author: Andy Lester <[email protected]> Date: Fri Dec 2 22:07:26 2016 -0500 Clean up warnings uncovered by 'clang -Weverything'. For: RT #130195 M hv.c M mathoms.c M op.c M perlio.c M universal.c ----------------------------------------------------------------------- Summary of changes: hv.c | 1 + mathoms.c | 2 ++ op.c | 6 ++++-- perlio.c | 9 +++++++-- universal.c | 4 ---- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/hv.c b/hv.c index c2646ca154..7239892099 100644 --- a/hv.c +++ b/hv.c @@ -2058,6 +2058,7 @@ Perl_hv_fill(pTHX_ HV *const hv) STRLEN count = 0; HE **ents = HvARRAY(hv); + PERL_UNUSED_CONTEXT; PERL_ARGS_ASSERT_HV_FILL; /* No keys implies no buckets used. diff --git a/mathoms.c b/mathoms.c index a3f20e79f4..c74a38625a 100644 --- a/mathoms.c +++ b/mathoms.c @@ -1688,6 +1688,7 @@ Perl_is_utf8_char_buf(const U8 *buf, const U8* buf_end) UV Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) { + PERL_UNUSED_CONTEXT; PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI; return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen)); @@ -1750,6 +1751,7 @@ See L</utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is returned UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) { + PERL_UNUSED_CONTEXT; PERL_ARGS_ASSERT_UTF8_TO_UVUNI; return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen)); diff --git a/op.c b/op.c index 3cd7ea282f..f8df8b4ef6 100644 --- a/op.c +++ b/op.c @@ -10360,11 +10360,13 @@ Perl_ck_defined(pTHX_ OP *o) /* 19990527 MJD */ case OP_PADAV: Perl_croak(aTHX_ "Can't use 'defined(@array)'" " (Maybe you should just omit the defined()?)"); - break; + NOT_REACHED; /* NOTREACHED */ + break; case OP_RV2HV: case OP_PADHV: Perl_croak(aTHX_ "Can't use 'defined(%%hash)'" " (Maybe you should just omit the defined()?)"); + NOT_REACHED; /* NOTREACHED */ break; default: /* no warning */ @@ -14459,7 +14461,7 @@ Perl_rpeep(pTHX_ OP *o) oldop = ourlast; o = oldop->op_next; goto redo; - + NOT_REACHED; /* NOTREACHED */ break; } diff --git a/perlio.c b/perlio.c index 0ca6dde0bf..ad1c6fef21 100644 --- a/perlio.c +++ b/perlio.c @@ -848,7 +848,6 @@ XS(XS_PerlIO__Layer__NoWarnings) during loading of layers. */ dXSARGS; - PERL_UNUSED_ARG(cv); PERL_UNUSED_VAR(items); DEBUG_i( if (items) @@ -860,7 +859,6 @@ XS(XS_PerlIO__Layer__find); /* prototype to pass -Wmissing-prototypes */ XS(XS_PerlIO__Layer__find) { dXSARGS; - PERL_UNUSED_ARG(cv); if (items < 2) Perl_croak(aTHX_ "Usage class->find(name[,load])"); else { @@ -3559,6 +3557,7 @@ STDCHAR * PerlIOStdio_get_base(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; return (STDCHAR*)PerlSIO_get_base(stdio); } @@ -3566,6 +3565,7 @@ Size_t PerlIOStdio_get_bufsiz(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; return PerlSIO_get_bufsiz(stdio); } #endif @@ -3575,6 +3575,7 @@ STDCHAR * PerlIOStdio_get_ptr(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; return (STDCHAR*)PerlSIO_get_ptr(stdio); } @@ -3582,6 +3583,7 @@ SSize_t PerlIOStdio_get_cnt(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; return PerlSIO_get_cnt(stdio); } @@ -3589,6 +3591,7 @@ void PerlIOStdio_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, SSize_t cnt) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; if (ptr != NULL) { #ifdef STDIO_PTR_LVALUE /* This is a long-standing infamous mess. The root of the @@ -5104,6 +5107,7 @@ PerlIO_tmpfile(void) void Perl_PerlIO_save_errno(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; if (!PerlIOValid(f)) return; PerlIOBase(f)->err = errno; @@ -5119,6 +5123,7 @@ Perl_PerlIO_save_errno(pTHX_ PerlIO *f) void Perl_PerlIO_restore_errno(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; if (!PerlIOValid(f)) return; SETERRNO(PerlIOBase(f)->err, PerlIOBase(f)->os_err); diff --git a/universal.c b/universal.c index 06f595f5a7..95934ca694 100644 --- a/universal.c +++ b/universal.c @@ -554,7 +554,6 @@ XS(XS_Internals_SvREADONLY) /* This is dangerous stuff. */ dXSARGS; SV * const svz = ST(0); SV * sv; - PERL_UNUSED_ARG(cv); /* [perl #77776] - called as &foo() not foo() */ if (!SvROK(svz)) @@ -588,7 +587,6 @@ XS(XS_constant__make_const) /* This is dangerous stuff. */ dXSARGS; SV * const svz = ST(0); SV * sv; - PERL_UNUSED_ARG(cv); /* [perl #77776] - called as &foo() not foo() */ if (!SvROK(svz) || items != 1) @@ -616,7 +614,6 @@ XS(XS_Internals_SvREFCNT) /* This is dangerous stuff. */ SV * const svz = ST(0); SV * sv; U32 refcnt; - PERL_UNUSED_ARG(cv); /* [perl #77776] - called as &foo() not foo() */ if ((items != 1 && items != 2) || !SvROK(svz)) @@ -777,7 +774,6 @@ XS(XS_re_is_regexp); /* prototype to pass -Wmissing-prototypes */ XS(XS_re_is_regexp) { dXSARGS; - PERL_UNUSED_VAR(cv); if (items != 1) croak_xs_usage(cv, "sv"); -- Perl5 Master Repository
