Use -Werror in frameworks/native/opengl/tests

* Remove or comment out unused local variables.
* Remove unused function.
* Cast print argument type to fix format mismatch warning.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I81e80849ac36288932df235cb0d63bd870357d86
diff --git a/opengl/tests/tritex/Android.mk b/opengl/tests/tritex/Android.mk
index 64382ed..7055afa 100644
--- a/opengl/tests/tritex/Android.mk
+++ b/opengl/tests/tritex/Android.mk
@@ -4,6 +4,8 @@
 LOCAL_SRC_FILES:= \
 	tritex.cpp
 
+LOCAL_CFLAGS := -Wall -Werror
+
 LOCAL_SHARED_LIBRARIES := \
 	libcutils \
     libEGL \
diff --git a/opengl/tests/tritex/tritex.cpp b/opengl/tests/tritex/tritex.cpp
index 2db73ef..c008003 100644
--- a/opengl/tests/tritex/tritex.cpp
+++ b/opengl/tests/tritex/tritex.cpp
@@ -93,9 +93,6 @@
 

 int main(int argc, char **argv)

 {

-    int q;
-    int start, end;

-
     printf("Initializing EGL...\n");
 

     WindowSurface windowSurface;
@@ -120,7 +117,6 @@
 

 int init_gl_surface(const WindowSurface& windowSurface)

 {

-    EGLint numConfigs = 1;

     EGLConfig myConfig = {0};

     EGLint attrib[] =

     {