This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/commit 4/5] "delete" ada-lex.c:input function, not used.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Thu, 14 Jan 2010 09:50:17 +0400
- Subject: [RFA/commit 4/5] "delete" ada-lex.c:input function, not used.
- References: <1263448218-19081-1-git-send-email-brobecker@adacore.com>
Flex generates a static function called "input" which actually isn't
being used at all, thus triggering a -Wunused-function warning.
Fortunately, it is possible to comment the function out by simply
defining YY_NO_INPUT in the preamble section of the Flex file.
I see this method was used earlier on other projects such as GCC.
gdb/ChangeLog:
"delete" ada-lex.c:input function, not used.
* ada-lex.l: #define YY_NO_INPUT.
Will commit in a moment.
--
Joel
---
gdb/ada-lex.l | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 2e6136e..f198ea7 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -58,6 +58,10 @@ static int find_dot_all (const char *);
#undef YY_DECL
#define YY_DECL static int yylex ( void )
+/* Flex generates a static function "input" which is not used.
+ Defining YY_NO_INPUT comments it out. */
+#define YY_NO_INPUT
+
#undef YY_INPUT
#define YY_INPUT(BUF, RESULT, MAX_SIZE) \
if ( *lexptr == '\000' ) \
--
1.6.3.3