Avoid warnings in flex-generated code.
authorCarl Worth <cworth@cworth.org>
Wed, 21 Jul 2010 19:49:01 +0000 (12:49 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 21 Jul 2010 19:49:01 +0000 (12:49 -0700)
Add declarations for two functions generated in the flex ouput. It
would be nicer if flex simply declared these generated functions as
static, but for now we can at least avoid the warning this way.

src/mesa/program/program_lexer.l

index 5730c6d..a912517 100644 (file)
@@ -140,6 +140,12 @@ handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval)
    } while(0);
 
 #define YY_EXTRA_TYPE struct asm_parser_state *
+
+/* Flex defines a couple of functions with no declarations nor the
+static keyword. Declare them here to avoid a compiler warning. */
+int yyget_column  (yyscan_t yyscanner);
+void yyset_column (int  column_no , yyscan_t yyscanner);
+
 %}
 
 num    [0-9]+