glsl: fixes -Werror,-Wunused-but-set-variable for clang-15 in glcpp-parse.y and glsl_parser.yy
error messages: src/compiler/glsl/glcpp/glcpp-parse.c:1691:9: error: variable 'glcpp_parser_nerrs' set but not used [-Werror,-Wunused-but-set-variable] int yynerrs = 0; ^ src/compiler/glsl/glsl_parser.cpp:2370:9: error: variable '_mesa_glsl_nerrs' set but not used [-Werror,-Wunused-but-set-variable] int yynerrs = 0; ^ Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19875>
This commit is contained in:
@@ -785,6 +785,8 @@ junk:
|
||||
glcpp_warning(&@1, parser, "extra tokens at end of directive");
|
||||
else
|
||||
glcpp_error(&@1, parser, "extra tokens at end of directive");
|
||||
|
||||
(void)yynerrs;
|
||||
}
|
||||
;
|
||||
|
||||
|
@@ -3105,5 +3105,7 @@ layout_defaults:
|
||||
if (!state->out_qualifier->push_to_global(& @1, state)) {
|
||||
YYERROR;
|
||||
}
|
||||
|
||||
(void)yynerrs;
|
||||
}
|
||||
;
|
||||
|
Reference in New Issue
Block a user