This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit 4/5] "delete" ada-lex.c:input function, not used.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]