atm, we dont build any of the flex generated code with -Werror. this patch addresses the few issues so that we can start doing that. -mike
--- include/lex.h
+++ 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
--- src/bsdl/vhdl_flex.l
+++ src/bsdl/vhdl_flex.l
@@ -148,6 +148,11 @@ static char *new_string (urj_bsdl_scan_e
#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
--- src/bsdl/Makefile.am
+++ 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
--- src/bsdl/bsdl_flex.l
+++ src/bsdl/bsdl_flex.l
@@ -147,6 +147,11 @@ static char *new_string (urj_bsdl_scan_e
#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
--- src/svf/svf_flex.l
+++ 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
--- src/svf/Makefile.am
+++ 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
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
