bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 3/4] Avoid a stupid 'const object should have initializer' warnin


From: Andreas Gruenbacher
Subject: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning
Date: Tue, 27 Apr 2010 23:24:04 +0200

* lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should
have initializer' warning.

Signed-off-by: Andreas Gruenbacher <address@hidden>
---
 ChangeLog     |    3 +++
 lib/getdate.y |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6743cce..3ed5687 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-04-27  Andreas Gruenbacher <address@hidden>
 
+       * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should
+       have initializer' warning.
+
        * lib/utimens.c: On some systems, the timestamp parameter of
        utimens(2) is not declared as a const *; avoid warnings in that case.
 
diff --git a/lib/getdate.y b/lib/getdate.y
index 445865b..dcfe3cc 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -152,7 +152,7 @@ typedef struct
 #if HAVE_COMPOUND_LITERALS
 # define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 })
 #else
-static relative_time const RELATIVE_TIME_0;
+static relative_time const RELATIVE_TIME_0 = { 0, 0, 0, 0, 0, 0, 0 };
 #endif
 
 /* Information passed to and from the parser.  */
-- 
1.7.1.rc1.12.ga601






reply via email to

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