From c98dedf57ad40a3b285ae1e3be758ae1c7f4f10d Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 18 Mar 2021 20:05:34 +0000 Subject: [PATCH] Validator: Fix GCC unused variable warning / error Change-Id: I36e1a86328249abccfde4e6b7712d6e2a9d32c7b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45286 Reviewed-by: Antonio Maiorano Commit-Queue: Ben Clayton --- src/validator/validator_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validator/validator_impl.cc b/src/validator/validator_impl.cc index d57a3c4e46..eaf131a339 100644 --- a/src/validator/validator_impl.cc +++ b/src/validator/validator_impl.cc @@ -71,7 +71,7 @@ bool ValidatorImpl::Validate() { // Validate global declarations in the order they appear in the module. for (auto* decl : program_->AST().GlobalDeclarations()) { - if (auto* ty = decl->As()) { + if (decl->Is()) { // Validated by Resolver (Struct types only) return true; } else if (auto* func = decl->As()) {