diff --git a/config.m4 b/config.m4
index f09ddcb40ec4ee23a3e741e26f94a690c8246861..8ab45e66037497824c90d62a0447412b525d17fb 100644
--- a/config.m4
+++ b/config.m4
@@ -533,7 +533,8 @@ if test "$PHP_GRPC" != "no"; then
     third_party/boringssl/ssl/t1_enc.c \
     third_party/boringssl/ssl/t1_lib.c \
     third_party/boringssl/ssl/tls_record.c \
-    , $ext_shared, , -Wall -Werror -std=c11 \
+    , $ext_shared, , -Wall -Werror \
+    -Wno-parentheses-equality -Wno-unused-value -std=c11 \
     -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
     -D_HAS_EXCEPTIONS=0 -DNOMINMAX)
 
diff --git a/templates/config.m4.template b/templates/config.m4.template
index 5e73901efa9b758729916a021dd92862990d354d..5847d456f51c89c941065e04344f86ce0a2f4469 100644
--- a/templates/config.m4.template
+++ b/templates/config.m4.template
@@ -38,7 +38,8 @@
       % endfor
       % endif
       % endfor
-      , $ext_shared, , -Wall -Werror -std=c11 ${"\\"}
+      , $ext_shared, , -Wall -Werror ${"\\"}
+      -Wno-parentheses-equality -Wno-unused-value -std=c11 ${"\\"}
       -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"}
       -D_HAS_EXCEPTIONS=0 -DNOMINMAX)