Enable Werror

With a few code changes and disabling a few warnings the code seems to
build with this.

Change-Id: Ia4658cf005415d4e5cd96f5b3ef28d1e1fe04421
diff --git a/BUILD.gn b/BUILD.gn
index 0c1105c..6fd83b7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -144,14 +144,11 @@
   cflags = [
     "-include",
     rebase_path("include/config_kernel_fuchsia_mt8167.h", root_build_dir),
-    "-Wno-error=missing-field-initializers",
     "-Wno-sign-compare",
     "-Wno-format",
     "-Wno-parentheses-equality",
     "-Wno-address-of-packed-member",
     "-Wno-unused-function",
-    "-Wno-reserved-user-defined-literal",
-    "-Wno-thread-safety-analysis",
   ]
 
   cflags_c = cflags
@@ -204,8 +201,6 @@
     "services/system/rgx_mtk",
   ]
 
-  configs -= [ "//build/config/fuchsia:werror" ]
-
   deps = [
     "//garnet/lib/magma/include:msd_abi",
     "//garnet/lib/magma/src/magma_util",
diff --git a/services/server/include/osfunc.h b/services/server/include/osfunc.h
index 8d17930..6ac95c4 100644
--- a/services/server/include/osfunc.h
+++ b/services/server/include/osfunc.h
@@ -74,6 +74,10 @@
 #elif defined(INTEGRITY_OS)
 #define OSConfineArrayIndexNoSpeculation(index, size) (index)
 #define PVRSRV_MISSING_NO_SPEC_IMPL
+#elif defined(__Fuchsia__)
+#define OSConfineArrayIndexNoSpeculation(index, size) (index)
+// TODO(MA-585) Implement. This is commented out to make -Werror ok.
+//#define PVRSRV_MISSING_NO_SPEC_IMPL
 #else
 /*************************************************************************/ /*!
 @Function       OSConfineArrayIndexNoSpeculation
diff --git a/services/server/include/pmr.h b/services/server/include/pmr.h
index c96158b..aa0e1b2 100644
--- a/services/server/include/pmr.h
+++ b/services/server/include/pmr.h
@@ -63,9 +63,9 @@
 
 typedef IMG_UINT64 PMR_BASE_T;
 typedef IMG_UINT64 PMR_SIZE_T;
-#define PMR_SIZE_FMTSPEC "0x%010"IMG_UINT64_FMTSPECX
+#define PMR_SIZE_FMTSPEC "0x%010" IMG_UINT64_FMTSPECX
 #define PMR_VALUE32_FMTSPEC "0x%08X"
-#define PMR_VALUE64_FMTSPEC "0x%016"IMG_UINT64_FMTSPECX
+#define PMR_VALUE64_FMTSPEC "0x%016" IMG_UINT64_FMTSPECX
 typedef IMG_UINT32 PMR_LOG2ALIGN_T;
 typedef IMG_UINT64 PMR_PASSWORD_T;