[zlib][build] Align a few warning flags between x86 and arm

Plus add flag for unused variables since it is active on V8 bazel
builders.

Bug: 103721
Change-Id: I73eac19583e567434d9971ef112562fe18d42a60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3646604
Reviewed-by: Noel Gordon <noel@chromium.org>
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1004117}
NOKEYCHECK=True
GitOrigin-RevId: 0ff4a51a6dc62ede3e208f80ac01520b690b7f99
diff --git a/BUILD.gn b/BUILD.gn
index 999b1de..ca58b86 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -265,10 +265,11 @@
 
 config("zlib_warnings") {
   if (is_clang) {
-    cflags = [ "-Wno-deprecated-non-prototype" ]
-    if (use_x86_x64_optimizations) {
-      cflags += [ "-Wno-incompatible-pointer-types" ]
-    }
+    cflags = [
+      "-Wno-deprecated-non-prototype",
+      "-Wno-incompatible-pointer-types",
+      "-Wunused-variable",
+    ]
   }
 }