Mercurial > hg > octave-nkf > gnulib-hg
changeset 1584:0f1daf1810b4
Fix warnings from gcc -W -Wall
(__attribute__): Define.
(ATTRIBUTE_UNUSED): Define.
(yyerror): Mark parameter as unused with ATTRIBUTE_UNUSED.
(MonthDayTable): Add initializers for last entry.
(UnitsTable): Likewise.
(OtherTable): Likewise.
(MilitaryTable): Likewise.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Thu, 31 Dec 1998 14:37:21 +0000 |
parents | 36ec1d59acb3 |
children | fe2f04f66a99 |
files | lib/getdate.y |
diffstat | 1 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/getdate.y +++ b/lib/getdate.y @@ -53,6 +53,14 @@ # include <string.h> #endif +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __attribute__(x) +#endif + +#ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif + /* Some old versions of bison generate parsers that use bcopy. That loses on systems that don't provide the function, so we have to redefine it here. */ @@ -471,7 +479,7 @@ { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, - { NULL } + { NULL, 0, 0 } }; /* Time units table. */ @@ -486,7 +494,7 @@ { "min", tMINUTE_UNIT, 1 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, - { NULL } + { NULL, 0, 0 } }; /* Assorted relative-time words. */ @@ -511,7 +519,7 @@ { "eleventh", tUNUMBER, 11 }, { "twelfth", tUNUMBER, 12 }, { "ago", tAGO, 1 }, - { NULL } + { NULL, 0, 0 } }; /* The timezone table. */ @@ -596,7 +604,7 @@ { "nzst", tZONE, -HOUR (12) }, /* New Zealand Standard */ { "nzdt", tDAYZONE, -HOUR (12) }, /* New Zealand Daylight */ { "idle", tZONE, -HOUR (12) }, /* International Date Line East */ - { NULL } + { NULL, 0, 0 } }; /* Military timezone table. */ @@ -626,7 +634,7 @@ { "x", tZONE, HOUR (-11) }, { "y", tZONE, HOUR (-12) }, { "z", tZONE, HOUR ( 0) }, - { NULL } + { NULL, 0, 0 } }; @@ -635,7 +643,7 @@ /* ARGSUSED */ static int yyerror (s) - char *s; + char *s ATTRIBUTE_UNUSED; { return 0; }