Skip to content

Commit 62569b6

Browse files
authored
Use the new warning control instead of unsafeFlags (#1882)
## Motivation In my recent work to build `protoc` from source I mistakenly disabled warnings by using unsafe flags. Unsafe flags make packages essentially unusable. ## Modifications Disable the warnings by using the new warning control settings introduced in 6.2 instead. ## Result Fixes #1881
1 parent 97bb244 commit 62569b6

File tree

2 files changed

+429
-9
lines changed

2 files changed

+429
-9
lines changed

Package.swift

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.10
1+
// swift-tools-version:6.2
22

33
// Package.swift
44
//
@@ -350,10 +350,8 @@ let package = Package(
350350
"protobuf/upb_generator/minitable/names_internal.cc",
351351
],
352352
cSettings: [
353-
.unsafeFlags([
354-
"-Wno-conversion",
355-
"-Wno-deprecated-declarations",
356-
])
353+
.disableWarning("conversion"),
354+
.disableWarning("deprecated-declarations"),
357355
],
358356
cxxSettings: [
359357
.headerSearchPath("abseil/"),
@@ -363,10 +361,8 @@ let package = Package(
363361
.headerSearchPath("protobuf/upb/"),
364362
.headerSearchPath("protobuf/upb_generator/"),
365363
.define("UPB_BOOTSTRAP_STAGE", to: "0"),
366-
.unsafeFlags([
367-
"-Wno-conversion",
368-
"-Wno-deprecated-declarations",
369-
]),
364+
.disableWarning("conversion"),
365+
.disableWarning("deprecated-declarations"),
370366
],
371367
linkerSettings: [
372368
.linkedFramework(

0 commit comments

Comments
 (0)