Use -Werror in frameworks/native/libs/vr
* Suppress/fix warnings of unused variable, parameter,
private-field, and function.
* Fix warnings about typedef missing declarator.
* Use -Wno-error to keep existing warnings, to fix later.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ifb82fcd76fcb5d9c9d9f017f2541581661493bd5
diff --git a/libs/vr/libvrsensor/Android.bp b/libs/vr/libvrsensor/Android.bp
index abad78b..1a15b6a 100644
--- a/libs/vr/libvrsensor/Android.bp
+++ b/libs/vr/libvrsensor/Android.bp
@@ -40,6 +40,10 @@
cc_library {
srcs: sourceFiles,
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
export_include_dirs: includeFiles,
static_libs: staticLibraries,
shared_libs: sharedLibraries,
diff --git a/libs/vr/libvrsensor/include/dvr/pose_client.h b/libs/vr/libvrsensor/include/dvr/pose_client.h
index ed75f84..d32df64 100644
--- a/libs/vr/libvrsensor/include/dvr/pose_client.h
+++ b/libs/vr/libvrsensor/include/dvr/pose_client.h
@@ -7,7 +7,7 @@
#ifndef __FLOAT32X4T_86
#define __FLOAT32X4T_86
typedef float float32x4_t __attribute__ ((__vector_size__ (16)));
-typedef struct float32x4x4_t { float32x4_t val[4]; };
+typedef struct float32x4x4_t { float32x4_t val[4]; } float32x4x4_t;
#endif
#endif