* getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 Nov 2004 19:18:44 +0000 (19:18 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 Nov 2004 19:18:44 +0000 (19:18 +0000)
(get_date): Overparenthesize to avoid GCC warning.

lib/ChangeLog
lib/getdate.y

index 0234704ee8b9877ecce53d4a20f26a75b2f328de..540db17d6582ea593f8bf01867d4265795c24f81 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-02  Derek R. Price  <derek@ximbiot.com>
+       and  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
+       (get_date): Overparenthesize to avoid GCC warning.
+
 2004-11-02  Bruno Haible  <bruno@clisp.org>
 
        * setenv.h (unsetenv): Define as a macro if the system's unsetenv()
index ec8c192507be4cab69283fc37b6c2506d2f1be04..d203c09ae024da7191a4810520559b0b21a7ab98 100644 (file)
@@ -50,6 +50,7 @@
 
 #include <ctype.h>
 #include <limits.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -1307,8 +1308,8 @@ get_date (struct timespec *result, char const *p, struct timespec const *now)
          int month = tm.tm_mon + pc.rel_month;
          int day = tm.tm_mday + pc.rel_day;
          if (((year < tm.tm_year) ^ (pc.rel_year < 0))
-             | (month < tm.tm_mon) ^ (pc.rel_month < 0)
-             | (day < tm.tm_mday) ^ (pc.rel_day < 0))
+             | ((month < tm.tm_mon) ^ (pc.rel_month < 0))
+             | ((day < tm.tm_mday) ^ (pc.rel_day < 0)))
            goto fail;
          tm.tm_year = year;
          tm.tm_mon = month;
@@ -1365,8 +1366,6 @@ get_date (struct timespec *result, char const *p, struct timespec const *now)
 
 #if TEST
 
-#include <stdio.h>
-
 int
 main (int ac, char **av)
 {