summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-02-25 16:25:05 -0800
committerMarge Bot <[email protected]>2020-02-26 17:20:24 +0000
commitec2f905ca8fda0deaba4fa099a9e47028c11d7e9 (patch)
treef6edb87bb9ab793481b448ef22ecff15bfc53337 /src/freedreno
parentbd53f4f56b2ca93c1fe4f5af29b5040d2b32e88f (diff)
freedreno/computerator: Fix defined-but-not-used warnings from lex/yacc.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3954> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3954>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/computerator/ir3_lexer.l2
-rw-r--r--src/freedreno/computerator/ir3_parser.y2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/freedreno/computerator/ir3_lexer.l b/src/freedreno/computerator/ir3_lexer.l
index d93b892808f..ce2fb70b3d9 100644
--- a/src/freedreno/computerator/ir3_lexer.l
+++ b/src/freedreno/computerator/ir3_lexer.l
@@ -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;
diff --git a/src/freedreno/computerator/ir3_parser.y b/src/freedreno/computerator/ir3_parser.y
index 93821b84f2b..f98233e9609 100644
--- a/src/freedreno/computerator/ir3_parser.y
+++ b/src/freedreno/computerator/ir3_parser.y
@@ -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