bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

minor strftime.c changes


From: Jim Meyering
Subject: minor strftime.c changes
Date: Fri, 11 Apr 2003 16:29:50 +0200

The first change avoids a warning about an unused function.
The second avoids a compile warning or failure with some non-gcc compiler.

2003-04-11  Jim Meyering  <address@hidden>

        * time/strftime.c (my_strftime_localtime_r): Include this function
        definition in the `#if ! HAVE_TM_GMTOFF' block.
        (widen): Cast alloca return value to proper type.

Index: strftime.c
===================================================================
RCS file: /cvs/glibc/libc/time/strftime.c,v
retrieving revision 1.93
diff -u -p -u -p -r1.93 strftime.c
--- strftime.c  19 Jan 2003 18:37:32 -0000      1.93
+++ strftime.c  11 Apr 2003 14:22:39 -0000
@@ -190,7 +190,6 @@ my_strftime_gmtime_r (t, tp)
   *tp = *l;
   return tp;
 }
-# endif /* ! HAVE_TM_GMTOFF */
 
 static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *));
 static struct tm *
@@ -204,6 +203,7 @@ my_strftime_localtime_r (t, tp)
   *tp = *l;
   return tp;
 }
+# endif /* ! HAVE_TM_GMTOFF */
 #endif /* ! defined _LIBC */
 
 
@@ -301,7 +301,7 @@ static const CHAR_T zeroes[16] = /* "000
     const char *__s = os;                                                    \
     memset (&__st, '\0', sizeof (__st));                                     \
     l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc);                           \
-    ws = alloca ((l + 1) * sizeof (wchar_t));                                \
+    ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t));                    \
     (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc);                          \
   }
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]