glsl/parser: Silence unused parameter warning
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 26 Sep 2017 01:07:50 +0000 (18:07 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 30 Oct 2017 16:27:09 +0000 (09:27 -0700)
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@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/ast.h
src/compiler/glsl/glsl_parser.yy
src/compiler/glsl/glsl_parser_extras.cpp

index 3bf4b085800fb3c9c7d7b948f5f8bb703b0a1dc9..1be86ac17d98a381c43695f187e3a27493c4b777 100644 (file)
@@ -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,
index 7b93d34fa3b136c498278dbe309359c2d639d232..3e555cf356dff5573eb049384d85dcccad092b0a 100644 (file)
@@ -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);
    }
    ;
index 51d835bc535da10f0037765b779bbdc86feece7c..77c0ea206f411606a8fb0b37c977235311e37a5d 100644 (file)
@@ -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) {