[Wconversion] Suppress warnings

Bug: 58162
Change-Id: Id17085c0f42dd4d9936c489d4594ce521c8b1431
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/sbase/+/426271
Reviewed-by: David Turner <digit@google.com>
diff --git a/libutf/BUILD.gn b/libutf/BUILD.gn
index f8894fa..8b51a69 100644
--- a/libutf/BUILD.gn
+++ b/libutf/BUILD.gn
@@ -2,6 +2,11 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+config("no-warnings") {
+  # Suppress warnings in upstream code that are triggered by Fuchsia compilation flags.
+  cflags = [ "-Wno-conversion" ]
+}
+
 static_library("libutf") {
   sources = [
     "fgetrune.c",
@@ -25,7 +30,5 @@
     "utf.c",
     "utftorunestr.c",
   ]
-
-  # Suppress warnings in upstream code that are triggered by Fuchsia compilation flags.
-  cflags = [ "-Wno-conversion" ]
+  public_configs = [ ":no-warnings" ]
 }