-Wall cleanup continues.
[p5sagit/p5-mst-13.2.git] / ext / POSIX / POSIX.xs
index 39d6f40..f079b7b 100644 (file)
 #endif
 #include <fcntl.h>
 
+#ifdef HAS_TZNAME
+#  if !defined(WIN32) && !defined(__CYGWIN__)
+extern char *tzname[];
+#  endif
+#else
+#if !defined(WIN32) || (defined(__MINGW32__) && !defined(tzname))
+char *tzname[] = { "" , "" };
+#endif
+#endif
+
 #if defined(__VMS) && !defined(__POSIX_SOURCE)
 #  include <libdef.h>       /* LIB$_INVARG constant */
 #  include <lib$routines.h> /* prototype for lib$ediv() */
@@ -3171,7 +3181,6 @@ sigaction(sig, optaction, oldaction = 0)
                                 PL_sig_name[sig],
                                 strlen(PL_sig_name[sig]),
                                 TRUE);
-           STRLEN n_a;
 
            /* Check optaction and set action */
            if(SvTRUE(optaction)) {
@@ -3668,7 +3677,7 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
            char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst);
            if (buf) {
                ST(0) = sv_2mortal(newSVpv(buf, 0));
-               free(buf);
+               Safefree(buf);
            }
        }
 
@@ -3730,7 +3739,6 @@ getcwd()
 #ifdef HAS_GETCWD
        char *          buf;
        int             buflen = 128;
-       int             i;
 
        New(0, buf, buflen, char);
        /* Many getcwd()s know how to automatically allocate memory