From 5d3df5994683c7a270ff639b51d8ff4aa02b4da5 Mon Sep 17 00:00:00 2001 From: RockfordWei Date: Mon, 28 Aug 2023 08:16:01 -0400 Subject: [PATCH 1/3] upgrading to 5.4 --- Package.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index a6f065a..5fc5b11 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.0 +// swift-tools-version:5.4 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -9,6 +9,11 @@ let package = Package( .library(name: "PerfectCZlib", targets: ["PerfectCZlib"]) ], targets: [ - .target(name: "PerfectCZlib", path: "PerfectCZlib", exclude: ["contrib", "test", "examples"]) + .target(name: "PerfectCZlib", + path: "PerfectCZlib", + exclude: ["contrib"], + cSettings: [ + .unsafeFlags(["-Wno-deprecated-non-prototype"]) + ]) ] ) From 33d753db58d860d0aa42656008cf1e305af3d5b5 Mon Sep 17 00:00:00 2001 From: Rockford Wei Date: Mon, 28 Aug 2023 08:22:04 -0400 Subject: [PATCH 2/3] reverting back --- Package.swift | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Package.swift b/Package.swift index 5fc5b11..a6f065a 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.4 +// swift-tools-version:4.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -9,11 +9,6 @@ let package = Package( .library(name: "PerfectCZlib", targets: ["PerfectCZlib"]) ], targets: [ - .target(name: "PerfectCZlib", - path: "PerfectCZlib", - exclude: ["contrib"], - cSettings: [ - .unsafeFlags(["-Wno-deprecated-non-prototype"]) - ]) + .target(name: "PerfectCZlib", path: "PerfectCZlib", exclude: ["contrib", "test", "examples"]) ] ) From 8295883fd760f601a2c8c3236af83c8c35f941c6 Mon Sep 17 00:00:00 2001 From: RockfordWei Date: Mon, 28 Aug 2023 08:36:57 -0400 Subject: [PATCH 3/3] suppressing warnings --- Package.swift | 2 +- PerfectCZlib/adler32.c | 1 + PerfectCZlib/compress.c | 1 + PerfectCZlib/crc32.c | 1 + PerfectCZlib/deflate.c | 1 + PerfectCZlib/gzclose.c | 1 + PerfectCZlib/gzlib.c | 1 + PerfectCZlib/gzread.c | 1 + PerfectCZlib/gzwrite.c | 1 + PerfectCZlib/infback.c | 1 + PerfectCZlib/inffast.c | 1 + PerfectCZlib/inflate.c | 1 + PerfectCZlib/inftrees.c | 1 + PerfectCZlib/trees.c | 1 + PerfectCZlib/uncompr.c | 1 + PerfectCZlib/zutil.c | 1 + 16 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index a6f065a..5b3919b 100644 --- a/Package.swift +++ b/Package.swift @@ -9,6 +9,6 @@ let package = Package( .library(name: "PerfectCZlib", targets: ["PerfectCZlib"]) ], targets: [ - .target(name: "PerfectCZlib", path: "PerfectCZlib", exclude: ["contrib", "test", "examples"]) + .target(name: "PerfectCZlib", path: "PerfectCZlib", exclude: ["contrib"]) ] ) diff --git a/PerfectCZlib/adler32.c b/PerfectCZlib/adler32.c index d0be438..de71a78 100644 --- a/PerfectCZlib/adler32.c +++ b/PerfectCZlib/adler32.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* adler32.c -- compute the Adler-32 checksum of a data stream * Copyright (C) 1995-2011, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/compress.c b/PerfectCZlib/compress.c index e2db404..31efc50 100644 --- a/PerfectCZlib/compress.c +++ b/PerfectCZlib/compress.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* compress.c -- compress a memory buffer * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/crc32.c b/PerfectCZlib/crc32.c index 9580440..697b3e0 100644 --- a/PerfectCZlib/crc32.c +++ b/PerfectCZlib/crc32.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/deflate.c b/PerfectCZlib/deflate.c index 415adbf..661c05b 100644 --- a/PerfectCZlib/deflate.c +++ b/PerfectCZlib/deflate.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* deflate.c -- compress data using the deflation algorithm * Copyright (C) 1995-2016 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/gzclose.c b/PerfectCZlib/gzclose.c index caeb99a..a97a442 100644 --- a/PerfectCZlib/gzclose.c +++ b/PerfectCZlib/gzclose.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* gzclose.c -- zlib gzclose() function * Copyright (C) 2004, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/gzlib.c b/PerfectCZlib/gzlib.c index a87d3d1..7eaed89 100644 --- a/PerfectCZlib/gzlib.c +++ b/PerfectCZlib/gzlib.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* gzlib.c -- zlib functions common to reading and writing gzip files * Copyright (C) 2004, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/gzread.c b/PerfectCZlib/gzread.c index 956b91e..e3b5b9b 100644 --- a/PerfectCZlib/gzread.c +++ b/PerfectCZlib/gzread.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* gzread.c -- zlib functions for reading gzip files * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/gzwrite.c b/PerfectCZlib/gzwrite.c index a2ee573..fc6bdae 100644 --- a/PerfectCZlib/gzwrite.c +++ b/PerfectCZlib/gzwrite.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* gzwrite.c -- zlib functions for writing gzip files * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/infback.c b/PerfectCZlib/infback.c index 59679ec..2caa932 100644 --- a/PerfectCZlib/infback.c +++ b/PerfectCZlib/infback.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* infback.c -- inflate using a call-back interface * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/inffast.c b/PerfectCZlib/inffast.c index a15876d..4ed450a 100644 --- a/PerfectCZlib/inffast.c +++ b/PerfectCZlib/inffast.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* inffast.c -- fast decoding * Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/inflate.c b/PerfectCZlib/inflate.c index ac333e8..f26658c 100644 --- a/PerfectCZlib/inflate.c +++ b/PerfectCZlib/inflate.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* inflate.c -- zlib decompression * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/inftrees.c b/PerfectCZlib/inftrees.c index fa27dcb..ee09446 100644 --- a/PerfectCZlib/inftrees.c +++ b/PerfectCZlib/inftrees.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* inftrees.c -- generate Huffman trees for efficient decoding * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/trees.c b/PerfectCZlib/trees.c index 357f313..d109ab6 100644 --- a/PerfectCZlib/trees.c +++ b/PerfectCZlib/trees.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* trees.c -- output deflated data using Huffman coding * Copyright (C) 1995-2016 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 diff --git a/PerfectCZlib/uncompr.c b/PerfectCZlib/uncompr.c index f03a1a8..8a5d6e3 100644 --- a/PerfectCZlib/uncompr.c +++ b/PerfectCZlib/uncompr.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* uncompr.c -- decompress a memory buffer * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/PerfectCZlib/zutil.c b/PerfectCZlib/zutil.c index 3b4d904..64d0d5a 100644 --- a/PerfectCZlib/zutil.c +++ b/PerfectCZlib/zutil.c @@ -1,3 +1,4 @@ +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" /* zutil.c -- target dependent utility functions for the compression library * Copyright (C) 1995-2005, 2010, 2011, 2012, 2016 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h