From 426097cf7c2e0e4b6c659bd0b744e6f51e61805d Mon Sep 17 00:00:00 2001 From: Sreelakshmi Haridas Maruthur Date: Tue, 13 Sep 2022 10:50:25 -0600 Subject: [PATCH] gles: Limit variable definition to the same scope as usage (#1495) Fix unused-variable errors by limiting variable definition to the case that would use it --- test_conformance/gles/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_conformance/gles/main.cpp b/test_conformance/gles/main.cpp index 644fa63c..60e020d8 100644 --- a/test_conformance/gles/main.cpp +++ b/test_conformance/gles/main.cpp @@ -320,8 +320,10 @@ int main(int argc, const char *argv[]) goto cleanup; } +#ifdef GLES3 int argc_ = (first_32_testname) ? 1 + (argc - first_32_testname) : argc; const char** argv_ = (first_32_testname) ? &argv[first_32_testname-1] : argv; +#endif // Execute the tests. for( size_t i = 0; i < numDevices; i++ ) {