workaround lex build warnings so we can use -Werror with them too

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1969 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent 70eb4a8270
commit 5b29e0dbe5

@ -1,3 +1,11 @@
2011-07-13 Mike Frysinger <vapier@gentoo.org>
* 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 <jie.zhang@analog.com>
* include/urjtag/cable.h (urj_cable_param_key_t): Add

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save