diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 4b9a036c..cae8f4d1 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,11 @@ +2011-07-13 Mike Frysinger + + * include/lex.h: New file for lex workarounds. + * src/bsdl/vhdl_flex.l, src/bsdl/bsdl_flex.l, src/svf/svf_flex.l: Pull + in new lex.h header to workaround random gcc warnings. + * src/bsdl/Makefile.am, src/svf/Makefile.am: Drop -Wno-error now that + the lex files compile warning free. + 2011-07-13 Jie Zhang * include/urjtag/cable.h (urj_cable_param_key_t): Add diff --git a/urjtag/include/lex.h b/urjtag/include/lex.h new file mode 100644 index 00000000..5bd39e62 --- /dev/null +++ b/urjtag/include/lex.h @@ -0,0 +1,16 @@ +/* + * A little glue to keep generated lex code warning free + */ + +#ifndef _LEX_H +#define _LEX_H + +#include "ansidecl.h" + +/* Fix up warnings from generated lex code */ +static int input (yyscan_t) ATTRIBUTE_UNUSED; +static void yyunput (int, char *, yyscan_t) ATTRIBUTE_UNUSED; +int lex_get_column (yyscan_t); +void lex_set_column (int, yyscan_t); + +#endif diff --git a/urjtag/src/bsdl/Makefile.am b/urjtag/src/bsdl/Makefile.am index 82cd5f07..ed6d21f4 100644 --- a/urjtag/src/bsdl/Makefile.am +++ b/urjtag/src/bsdl/Makefile.am @@ -46,10 +46,6 @@ noinst_HEADERS = \ AM_CFLAGS = $(WARNINGCFLAGS) -libbsdl_flex_la_CFLAGS = \ - $(AM_CFLAGS) \ - -Wno-error - # additional dependencies # - *_flex files must be processed after their *_bison counterparts # to ensure that *_bison.h is present diff --git a/urjtag/src/bsdl/bsdl_flex.l b/urjtag/src/bsdl/bsdl_flex.l index 48043076..1f7b98c9 100644 --- a/urjtag/src/bsdl/bsdl_flex.l +++ b/urjtag/src/bsdl/bsdl_flex.l @@ -147,6 +147,11 @@ static char *new_string (urj_bsdl_scan_extra_t *, const char *); #define BIN_X 2 #define HEX 3 +/* Fix up warnings from generated lex code */ +#define lex_get_column yyget_column +#define lex_set_column yyset_column +#include "lex.h" + %} %a 2800 %e 1200 diff --git a/urjtag/src/bsdl/vhdl_flex.l b/urjtag/src/bsdl/vhdl_flex.l index 3f28418c..3101d98f 100644 --- a/urjtag/src/bsdl/vhdl_flex.l +++ b/urjtag/src/bsdl/vhdl_flex.l @@ -148,6 +148,11 @@ static char *new_string (urj_bsdl_scan_extra_t *, const char *); #define DECIMAL 1 #define BIN_X 2 +/* Fix up warnings from generated lex code */ +#define lex_get_column yyget_column +#define lex_set_column yyset_column +#include "lex.h" + %} %a 2800 %e 1200 diff --git a/urjtag/src/svf/Makefile.am b/urjtag/src/svf/Makefile.am index b630a040..9970596f 100644 --- a/urjtag/src/svf/Makefile.am +++ b/urjtag/src/svf/Makefile.am @@ -37,10 +37,6 @@ libsvf_flex_la_SOURCES = \ AM_CFLAGS = $(WARNINGCFLAGS) -libsvf_flex_la_CFLAGS = \ - $(AM_CFLAGS) \ - -Wno-error - # additional dependencies # - *_flex files must be processed after their *_bison counterparts # to ensure that *_bison.h is present diff --git a/urjtag/src/svf/svf_flex.l b/urjtag/src/svf/svf_flex.l index 579d4181..1475f9c9 100644 --- a/urjtag/src/svf/svf_flex.l +++ b/urjtag/src/svf/svf_flex.l @@ -66,6 +66,11 @@ int yywrap(yyscan_t scanner) yylloc->first_line = yylloc->last_line = yylloc->first_column = yylloc->last_column = 1; \ } while (0) +/* Fix up warnings from generated lex code */ +#define lex_get_column yyget_column +#define lex_set_column yyset_column +#include "lex.h" + %} %pointer