Sync from coreutils.
[gnulib.git] / lib / posixtm.c
index 5273a71..85936f3 100644 (file)
@@ -193,18 +193,18 @@ posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits)
 bool
 posixtime (time_t *p, const char *s, unsigned int syntax_bits)
 {
-  struct tm tm0;
-  struct tm tm1;
-  struct tm const *tm;
-  time_t t;
-
+  struct tm tm0
 #ifdef lint
   /* Placate gcc-4's -Wuninitialized.
-     posix_time_parse fails to set tm0.tm_year only when it returns
+     posix_time_parse fails to set all of tm0 only when it returns
      nonzero (due to year() returning nonzero), and in that case,
      this code doesn't use the tm0 at all.  */
-  tm0.tm_year = 0;
+    = { 0, }
 #endif
+    ;
+  struct tm tm1;
+  struct tm const *tm;
+  time_t t;
 
   if (posix_time_parse (&tm0, s, syntax_bits))
     return false;