freedreno/computerator: Fix defined-but-not-used warnings from lex/yacc.
authorEric Anholt <eric@anholt.net>
Wed, 26 Feb 2020 00:25:05 +0000 (16:25 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Feb 2020 17:20:24 +0000 (17:20 +0000)
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3954>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3954>

src/freedreno/computerator/ir3_lexer.l
src/freedreno/computerator/ir3_parser.y

index d93b892808f392e86bb2d2784f6bb0154cae0a96..ce2fb70b3d99363e37408a3992ce222c246e6095 100644 (file)
@@ -26,6 +26,8 @@
 #include "ir3/ir3.h"
 #include "ir3_parser.h"
 
+#define YY_NO_INPUT
+#define YY_NO_UNPUT
 #define TOKEN(t) (ir3_yylval.tok = t)
 extern YYSTYPE ir3_yylval;
 
index 93821b84f2bcf6969474344c0015bc2133638db1..f98233e9609840d61a5345de11fe438b5ddac6ce 100644 (file)
@@ -222,12 +222,14 @@ struct ir3 * ir3_parse(struct ir3_kernel *k, FILE *f)
 }
 
 %{
+#if YYDEBUG
 static void print_token(FILE *file, int type, YYSTYPE value)
 {
        fprintf(file, "\ntype: %d\n", type);
 }
 
 #define YYPRINT(file, type, value) print_token(file, type, value)
+#endif
 %}
 
 %token <num> T_INT