Mesa (glsl2): glcpp-lex: Declare some generated functions to eliminate compiler warnings.
Ian Romanick
idr at kemper.freedesktop.org
Wed Jul 21 00:07:47 UTC 2010
Module: Mesa
Branch: glsl2
Commit: a9bb4bcde360ef8d0a444bf1c4a7d02a8fdb5fa1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9bb4bcde360ef8d0a444bf1c4a7d02a8fdb5fa1
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jul 20 15:03:20 2010 -0700
glcpp-lex: Declare some generated functions to eliminate compiler warnings.
It's really a bug in flex that these functions are generated with neither
a declaration nor the 'static' keyword, but we can at least avoid the
warnings this way.
---
src/glsl/glcpp/glcpp-lex.l | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
index 6773832..29b2769 100644
--- a/src/glsl/glcpp/glcpp-lex.l
+++ b/src/glsl/glcpp/glcpp-lex.l
@@ -29,6 +29,11 @@
#include "glcpp.h"
#include "glcpp-parse.h"
+/* Flex annoyingly generates some functions without making them
+ * static. Let's declare them here. */
+int glcpp_get_column (yyscan_t yyscanner);
+void glcpp_set_column (int column_no , yyscan_t yyscanner);
+
#define YY_USER_ACTION \
do { \
yylloc->source = 0; \
More information about the mesa-commit
mailing list