-Wall is intolerably noisy with icc.
[p5sagit/p5-mst-13.2.git] / perlio.c
index dae7f9b..5415db3 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -163,6 +163,9 @@ perlsio_binmode(FILE *fp, int iotype, int mode)
     else
        return 0;
 #  else
+    (void)fp;
+    (void)iotype;
+    (void)mode;
     return 1;
 #  endif
 #endif
@@ -245,6 +248,9 @@ int
 PerlIO_binmode(pTHX_ PerlIO *fp, int iotype, int mode, const char *names)
 {
 #ifdef USE_SFIO
+    (void)iotype;
+    (void)mode;
+    (void)names;
     return 1;
 #else
     return perlsio_binmode(fp, iotype, mode);
@@ -264,7 +270,7 @@ PerlIO_fdupopen(pTHX_ PerlIO *f, CLONE_PARAMS *param, int flags)
     return win32_fdupopen(f);
 #else
     if (f) {
-       int fd = PerlLIO_dup(PerlIO_fileno(f));
+       const int fd = PerlLIO_dup(PerlIO_fileno(f));
        if (fd >= 0) {
            char mode[8];
            int omode = fcntl(fd, F_GETFL);
@@ -756,7 +762,8 @@ PerlIO_find_layer(pTHX_ const char *name, STRLEN len, int load)
            ENTER;
            SAVEINT(PL_in_load_module);
            if (cv) {
-               SAVESPTR(PL_warnhook);
+               SAVEGENERICSV(PL_warnhook);
+               (void)SvREFCNT_inc(cv);
                PL_warnhook = (SV *) cv;
            }
            PL_in_load_module++;
@@ -861,7 +868,7 @@ PerlIO_tab_sv(pTHX_ PerlIO_funcs *tab)
     return sv;
 }
 
-static XS(XS_PerlIO__Layer__NoWarnings)
+XS(XS_PerlIO__Layer__NoWarnings)
 {
     /* This is used as a %SIG{__WARN__} handler to supress warnings
        during loading of layers.
@@ -872,7 +879,7 @@ static XS(XS_PerlIO__Layer__NoWarnings)
     XSRETURN(0);
 }
 
-static XS(XS_PerlIO__Layer__find)
+XS(XS_PerlIO__Layer__find)
 {
     dXSARGS;
     if (items < 2)
@@ -4885,7 +4892,7 @@ PerlIO_tmpfile(void)
          f = PerlIO_fdopen(fd, "w+");
          if (f)
               PerlIOBase(f)->flags |= PERLIO_F_TEMP;
-         PerlLIO_unlink(SvPVX(sv));
+         PerlLIO_unlink(SvPVX_const(sv));
          SvREFCNT_dec(sv);
      }
 #    else      /* !HAS_MKSTEMP, fallback to stdio tmpfile(). */
@@ -5033,3 +5040,13 @@ PerlIO_sprintf(char *s, int n, const char *fmt, ...)
     return result;
 }
 #endif
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */