From: Rafael Garcia-Suarez Date: Sat, 3 Mar 2007 09:34:23 +0000 (+0000) Subject: Compilation warnings fixes by Jerry D. Hedden X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=58c0efa57789d77088d564834046e633a5c42edc;p=p5sagit%2Fp5-mst-13.2.git Compilation warnings fixes by Jerry D. Hedden p4raw-id: //depot/perl@30447 --- diff --git a/perlio.c b/perlio.c index ad7dec7..544b642 100644 --- a/perlio.c +++ b/perlio.c @@ -134,6 +134,7 @@ perlsio_binmode(FILE *fp, int iotype, int mode) */ #ifdef DOSISH # if defined(atarist) || defined(__MINT__) + PERL_UNUSED_ARG(iotype); if (!fflush(fp)) { if (mode & O_BINARY) ((FILE *) fp)->_flag |= _IOBIN; @@ -144,6 +145,7 @@ perlsio_binmode(FILE *fp, int iotype, int mode) return 0; # else dTHX; + PERL_UNUSED_ARG(iotype); #ifdef NETWARE if (PerlLIO_setmode(fp, mode) != -1) { #else @@ -174,6 +176,9 @@ document #else # if defined(USEMYBINMODE) dTHX; +# if defined(__CYGWIN__) + PERL_UNUSED_ARG(iotype); +# endif if (my_binmode(fp, iotype, mode) != FALSE) return 1; else @@ -914,6 +919,7 @@ XS(XS_PerlIO__Layer__NoWarnings) */ dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items) PerlIO_debug("warning:%s\n",SvPV_nolen_const(ST(0))); XSRETURN(0); @@ -923,6 +929,7 @@ XS(XS_PerlIO__Layer__find) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 2) Perl_croak(aTHX_ "Usage class->find(name[,load])"); else { diff --git a/pp_sys.c b/pp_sys.c index 44adca6..c35fb5b 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3341,7 +3341,7 @@ PP(pp_fttext) #if defined(DOSISH) || defined(USEMYBINMODE) /* ignore trailing ^Z on short files */ - if (len && len < sizeof(tbuf) && tbuf[len-1] == 26) + if (len && len < (I32)sizeof(tbuf) && tbuf[len-1] == 26) --len; #endif diff --git a/universal.c b/universal.c index f065965..4cbda94 100644 --- a/universal.c +++ b/universal.c @@ -313,6 +313,7 @@ XS(XS_UNIVERSAL_isa) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 2) Perl_croak(aTHX_ "Usage: UNIVERSAL::isa(reference, kind)"); @@ -341,6 +342,7 @@ XS(XS_UNIVERSAL_can) const char *name; SV *rv; HV *pkg = NULL; + PERL_UNUSED_ARG(cv); if (items != 2) Perl_croak(aTHX_ "Usage: UNIVERSAL::can(object-ref, method)"); @@ -379,6 +381,7 @@ XS(XS_UNIVERSAL_DOES) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 2) Perl_croak(aTHX_ "Usage: invocant->does(kind)"); @@ -403,6 +406,7 @@ XS(XS_UNIVERSAL_VERSION) GV *gv; SV *sv; const char *undef; + PERL_UNUSED_ARG(cv); if (SvROK(ST(0))) { sv = (SV*)SvRV(ST(0)); @@ -475,6 +479,7 @@ XS(XS_version_new) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items > 3) Perl_croak(aTHX_ "Usage: version::new(class, version)"); SP -= items; @@ -510,6 +515,7 @@ XS(XS_version_stringify) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1) Perl_croak(aTHX_ "Usage: version::stringify(lobj, ...)"); SP -= items; @@ -533,6 +539,7 @@ XS(XS_version_numify) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1) Perl_croak(aTHX_ "Usage: version::numify(lobj, ...)"); SP -= items; @@ -556,6 +563,7 @@ XS(XS_version_normal) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1) Perl_croak(aTHX_ "Usage: version::normal(lobj, ...)"); SP -= items; @@ -579,6 +587,7 @@ XS(XS_version_vcmp) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1) Perl_croak(aTHX_ "Usage: version::vcmp(lobj, ...)"); SP -= items; @@ -624,6 +633,7 @@ XS(XS_version_boolean) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1) Perl_croak(aTHX_ "Usage: version::boolean(lobj, ...)"); SP -= items; @@ -642,6 +652,7 @@ XS(XS_version_noop) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1) Perl_croak(aTHX_ "Usage: version::noop(lobj, ...)"); if (sv_derived_from(ST(0), "version")) @@ -657,6 +668,7 @@ XS(XS_version_is_alpha) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: version::is_alpha(lobj)"); SP -= items; @@ -677,6 +689,7 @@ XS(XS_version_qv) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: version::qv(ver)"); SP -= items; @@ -721,6 +734,7 @@ XS(XS_utf8_is_utf8) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: utf8::is_utf8(sv)"); else { @@ -737,6 +751,7 @@ XS(XS_utf8_valid) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: utf8::valid(sv)"); else { @@ -755,6 +770,7 @@ XS(XS_utf8_encode) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: utf8::encode(sv)"); sv_utf8_encode(ST(0)); @@ -765,6 +781,7 @@ XS(XS_utf8_decode) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: utf8::decode(sv)"); else { @@ -780,6 +797,7 @@ XS(XS_utf8_upgrade) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: utf8::upgrade(sv)"); else { @@ -797,6 +815,7 @@ XS(XS_utf8_downgrade) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: utf8::downgrade(sv, failok=0)"); else { @@ -815,6 +834,7 @@ XS(XS_utf8_native_to_unicode) dVAR; dXSARGS; const UV uv = SvUV(ST(0)); + PERL_UNUSED_ARG(cv); if (items > 1) Perl_croak(aTHX_ "Usage: utf8::native_to_unicode(sv)"); @@ -828,6 +848,7 @@ XS(XS_utf8_unicode_to_native) dVAR; dXSARGS; const UV uv = SvUV(ST(0)); + PERL_UNUSED_ARG(cv); if (items > 1) Perl_croak(aTHX_ "Usage: utf8::unicode_to_native(sv)"); @@ -841,6 +862,7 @@ XS(XS_Internals_SvREADONLY) /* This is dangerous stuff. */ dVAR; dXSARGS; SV * const sv = SvRV(ST(0)); + PERL_UNUSED_ARG(cv); if (items == 1) { if (SvREADONLY(sv)) @@ -867,6 +889,7 @@ XS(XS_Internals_SvREFCNT) /* This is dangerous stuff. */ dVAR; dXSARGS; SV * const sv = SvRV(ST(0)); + PERL_UNUSED_ARG(cv); if (items == 1) XSRETURN_IV(SvREFCNT(sv) - 1); /* Minus the ref created for us. */ @@ -882,6 +905,7 @@ XS(XS_Internals_hv_clear_placehold) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items != 1) Perl_croak(aTHX_ "Usage: UNIVERSAL::hv_clear_placeholders(hv)"); @@ -902,6 +926,7 @@ XS(XS_PerlIO_get_layers) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (items < 1 || items % 2 == 0) Perl_croak(aTHX_ "Usage: PerlIO_get_layers(filehandle[,args])"); #ifdef USE_PERLIO @@ -1048,6 +1073,7 @@ XS(XS_Internals_HvREHASH) /* Subject to change */ { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if (SvROK(ST(0))) { const HV * const hv = (HV *) SvRV(ST(0)); if (items == 1 && SvTYPE(hv) == SVt_PVHV) { diff --git a/xsutils.c b/xsutils.c index 900ec3f..4ea4de2 100644 --- a/xsutils.c +++ b/xsutils.c @@ -161,6 +161,7 @@ XS(XS_attributes_bootstrap) { dVAR; dXSARGS; + PERL_UNUSED_ARG(cv); if( items > 1 ) Perl_croak(aTHX_ "Usage: attributes::bootstrap $module"); @@ -178,6 +179,7 @@ XS(XS_attributes__modify_attrs) dVAR; dXSARGS; SV *rv, *sv; + PERL_UNUSED_ARG(cv); if (items < 1) { usage: @@ -201,6 +203,7 @@ XS(XS_attributes__fetch_attrs) dXSARGS; SV *rv, *sv; cv_flags_t cvflags; + PERL_UNUSED_ARG(cv); if (items != 1) { usage: @@ -247,6 +250,7 @@ XS(XS_attributes__guess_stash) dXSARGS; SV *rv, *sv; dXSTARG; + PERL_UNUSED_ARG(cv); if (items != 1) { usage: @@ -296,6 +300,7 @@ XS(XS_attributes_reftype) dXSARGS; SV *rv, *sv; dXSTARG; + PERL_UNUSED_ARG(cv); if (items != 1) { usage: