bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] lib/argp-help.c patch


From: Albert Chin
Subject: [bug-gnulib] lib/argp-help.c patch
Date: Mon, 10 Jan 2005 19:48:10 -0600
User-agent: Mutt/1.5.6i

Initializing a struct with non-constant initializers is not
C89-compliant (though it is C99-compliant). The HP-UX 10.20
compiler errors out with:
 cc: "argp-help.c", line 1058: error 1521: Incorrect initialization.
 cc: "argp-help.c", line 1058: error 1521: Incorrect initialization.
 cc: "argp-help.c", line 1058: error 1521: Incorrect initialization.
 cc: "argp-help.c", line 1058: error 1521: Incorrect initialization.

-- 
albert chin (address@hidden)

-- snip snip
Index: lib/argp-help.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/argp-help.c,v
retrieving revision 1.12
diff -u -3 -p -r1.12 argp-help.c
--- lib/argp-help.c     30 Sep 2004 16:41:30 -0000      1.12
+++ lib/argp-help.c     10 Jan 2005 20:45:12 -0000
@@ -1055,7 +1055,12 @@ hol_entry_help (struct hol_entry *entry,
   int old_wm = __argp_fmtstream_wmargin (stream);
   /* PEST is a state block holding some of our variables that we'd like to
      share with helper functions.  */
-  struct pentry_state pest = { entry, stream, hhstate, 1, state };
+  struct pentry_state pest = { NULL, NULL, NULL, 1, NULL };
+
+  pest.entry = entry;
+  pest.stream = stream;
+  pest.hhstate = hhstate;
+  pest.state = state;
 
   if (! odoc (real))
     for (opt = real, num = entry->num; num > 0; opt++, num--)




reply via email to

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