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:
Yonggang Luo
2022-11-04 20:48:02 +08:00
committed by Marge Bot
parent 113def3bbd
commit 36ba2e31f6
2 changed files with 4 additions and 0 deletions

View File

@@ -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;
}
;

View File

@@ -3105,5 +3105,7 @@ layout_defaults:
if (!state->out_qualifier->push_to_global(& @1, state)) {
YYERROR;
}
(void)yynerrs;
}
;