boringssl: Disable function type cast warnings

Clang used by pigweed now performs stricker type checks in function
pointers. This patch disables these type warnings to unblock the
clang roll.

Bug: 329452650
Change-Id: I52413be54f439d75b09ddcd531da7c00941f6cf1
Reviewed-on: https://pigweed-review.googlesource.com/c/open-dice/+/203310
Reviewed-by: Prabhu Karthikeyan Rajasekaran <prabhukr@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Haowei Wu <haowei@google.com>
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index bde1a77..dc9ea25 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -38,9 +38,23 @@
   ]
 }
 
+config("no_cast_function_type_warnings") {
+  cflags = [
+    # Disable "-Wcast-fuction-type-strict"
+    # and "-Wcast-function-type-mismatch"  which enforce an exact type match
+    # between a function pointer and the target function.
+    "-Wno-cast-function-type-strict",
+    "-Wno-cast-function-type-mismatch",
+    "-Wno-unknown-warning-option",
+  ]
+}
+
 pw_static_library("crypto") {
   sources = crypto_sources
   public = crypto_headers
   public_configs = [ ":external_config" ]
-  configs = [ ":internal_config" ]
+  configs = [
+    ":internal_config",
+    ":no_cast_function_type_warnings",
+  ]
 }