Fix warnings and turn on -Werror for C++ tests.

Change-Id: Ia11406100c32e438eb103585a16e51a54365b5d7
diff --git a/tests/cppallocation/Android.mk b/tests/cppallocation/Android.mk
index fd1cc4f..52b8102 100644
--- a/tests/cppallocation/Android.mk
+++ b/tests/cppallocation/Android.mk
@@ -11,7 +11,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-cppallocation
diff --git a/tests/cppbasic-getpointer/Android.mk b/tests/cppbasic-getpointer/Android.mk
index 9d56cf5..d9e5fcc 100644
--- a/tests/cppbasic-getpointer/Android.mk
+++ b/tests/cppbasic-getpointer/Android.mk
@@ -15,7 +15,7 @@
 
 intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,)
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 
 LOCAL_C_INCLUDES += frameworks/rs/cpp
 LOCAL_C_INCLUDES += frameworks/rs
diff --git a/tests/cppbasic-getpointer/compute.cpp b/tests/cppbasic-getpointer/compute.cpp
index 033e7b3..307bec0 100644
--- a/tests/cppbasic-getpointer/compute.cpp
+++ b/tests/cppbasic-getpointer/compute.cpp
@@ -45,9 +45,9 @@
     uint32_t *output = (uint32_t*)aout->getPointer(&outputStride);
 
     printf("Input pointer: %p\n", input);
-    printf("Input stride: %u\n", inputStride);
+    printf("Input stride: %zu\n", inputStride);
     printf("Output pointer: %p\n", output);
-    printf("Output stride: %u\n", outputStride);
+    printf("Output stride: %zu\n", outputStride);
 
     inputStride /= sizeof(uint32_t);
     outputStride /= sizeof(uint32_t);
@@ -76,7 +76,7 @@
     for (size_t i = 0; i < DIMY; i++) {
         for (size_t j = 0; j < DIMX; j++) {
             if (input[i * inputStride + j] != ~(output[i * inputStride + j])) {
-                printf("Mismatch at location %u, %u\n", j, i);
+                printf("Mismatch at location %zu, %zu\n", j, i);
                 failed = true;
                 return failed;
             }
diff --git a/tests/cppbasic-shared/Android.mk b/tests/cppbasic-shared/Android.mk
index 29cbaa4..669e4cc 100644
--- a/tests/cppbasic-shared/Android.mk
+++ b/tests/cppbasic-shared/Android.mk
@@ -15,7 +15,7 @@
 
 intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,)
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 
 LOCAL_C_INCLUDES += frameworks/rs/cpp
 LOCAL_C_INCLUDES += frameworks/rs
diff --git a/tests/cppbasic/Android.mk b/tests/cppbasic/Android.mk
index 2c99769..3222e40 100644
--- a/tests/cppbasic/Android.mk
+++ b/tests/cppbasic/Android.mk
@@ -11,7 +11,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-compute
diff --git a/tests/cppf16/Android.mk b/tests/cppf16/Android.mk
index 3d19292..da21d4b 100644
--- a/tests/cppf16/Android.mk
+++ b/tests/cppf16/Android.mk
@@ -9,7 +9,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-cppf16
diff --git a/tests/cppreduce/Android.mk b/tests/cppreduce/Android.mk
index 044d750..5e795f6 100644
--- a/tests/cppreduce/Android.mk
+++ b/tests/cppreduce/Android.mk
@@ -13,7 +13,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-reduce
diff --git a/tests/cppstrided/Android.mk b/tests/cppstrided/Android.mk
index 8f801c4..9a9afa7 100644
--- a/tests/cppstrided/Android.mk
+++ b/tests/cppstrided/Android.mk
@@ -11,7 +11,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-cppstrided
diff --git a/tests/latency/Android.mk b/tests/latency/Android.mk
index 736d9cf..0bc6cfd 100644
--- a/tests/latency/Android.mk
+++ b/tests/latency/Android.mk
@@ -11,7 +11,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-latency
diff --git a/tests/typecheck/Android.mk b/tests/typecheck/Android.mk
index d976dc0..b9481a8 100644
--- a/tests/typecheck/Android.mk
+++ b/tests/typecheck/Android.mk
@@ -11,7 +11,7 @@
 LOCAL_STATIC_LIBRARIES := \
 	libRScpp_static
 
-LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS := -std=c++11 -Werror
 LOCAL_LDFLAGS += -llog -ldl
 
 LOCAL_MODULE:= rstest-typecheck