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/fillrate/Android.bp b/opengl/tests/fillrate/Android.bp
index 543f1e3..689cee4 100644
--- a/opengl/tests/fillrate/Android.bp
+++ b/opengl/tests/fillrate/Android.bp
@@ -3,6 +3,11 @@
 
     srcs: ["fillrate.cpp"],
 
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+
     gtest: false,
 
     shared_libs: [
diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp
index a42f3f2..f022069 100644
--- a/opengl/tests/fillrate/fillrate.cpp
+++ b/opengl/tests/fillrate/fillrate.cpp
@@ -153,7 +153,7 @@
 
      for (int c=1, j=0 ; c<32 ; c++, j++) {
          nsecs_t t = times[j];
-         printf("%ld\t%d\t%f\n", t, c, (double(t)/c)/1000000.0);
+         printf("%lld\t%d\t%f\n", (long long)t, c, (double(t)/c)/1000000.0);
      }