Mesa (master): glsl/parser: Silence unused parameter warning
Ian Romanick
idr at kemper.freedesktop.org
Mon Oct 30 16:27:33 UTC 2017
Module: Mesa
Branch: master
Commit: fc07ab165b1aaf6a64e61ade9eb605165146cd96
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc07ab165b1aaf6a64e61ade9eb605165146cd96
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Mon Sep 25 18:07:50 2017 -0700
glsl/parser: Silence unused parameter warning
glsl/glsl_parser_extras.cpp: In constructor ‘ast_struct_specifier::ast_struct_specifier(void*, const char*, ast_declarator_list*)’:
glsl/glsl_parser_extras.cpp:1675:50: warning: unused parameter ‘lin_ctx’ [-Wunused-parameter]
ast_struct_specifier::ast_struct_specifier(void *lin_ctx, const char *identifier,
^~~~~~~
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/compiler/glsl/ast.h | 4 ++--
src/compiler/glsl/glsl_parser.yy | 4 ++--
src/compiler/glsl/glsl_parser_extras.cpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h
index 3bf4b08580..1be86ac17d 100644
--- a/src/compiler/glsl/ast.h
+++ b/src/compiler/glsl/ast.h
@@ -832,8 +832,8 @@ class ast_declarator_list;
class ast_struct_specifier : public ast_node {
public:
- ast_struct_specifier(void *lin_ctx, const char *identifier,
- ast_declarator_list *declarator_list);
+ ast_struct_specifier(const char *identifier,
+ ast_declarator_list *declarator_list);
virtual void print(void) const;
virtual ir_rvalue *hir(exec_list *instructions,
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy
index 7b93d34fa3..3e555cf356 100644
--- a/src/compiler/glsl/glsl_parser.yy
+++ b/src/compiler/glsl/glsl_parser.yy
@@ -2377,14 +2377,14 @@ struct_specifier:
STRUCT any_identifier '{' struct_declaration_list '}'
{
void *ctx = state->linalloc;
- $$ = new(ctx) ast_struct_specifier(ctx, $2, $4);
+ $$ = new(ctx) ast_struct_specifier($2, $4);
$$->set_location_range(@2, @5);
state->symbols->add_type($2, glsl_type::void_type);
}
| STRUCT '{' struct_declaration_list '}'
{
void *ctx = state->linalloc;
- $$ = new(ctx) ast_struct_specifier(ctx, NULL, $3);
+ $$ = new(ctx) ast_struct_specifier(NULL, $3);
$$->set_location_range(@2, @4);
}
;
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 51d835bc53..77c0ea206f 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1672,7 +1672,7 @@ ast_struct_specifier::print(void) const
}
-ast_struct_specifier::ast_struct_specifier(void *lin_ctx, const char *identifier,
+ast_struct_specifier::ast_struct_specifier(const char *identifier,
ast_declarator_list *declarator_list)
{
if (identifier == NULL) {
More information about the mesa-commit
mailing list