diff --git a/upstream_utils/fmt_patches/0001-Don-t-throw-on-write-failure.patch b/upstream_utils/fmt_patches/0001-Don-t-throw-on-write-failure.patch index 583fc4a813..22637b7528 100644 --- a/upstream_utils/fmt_patches/0001-Don-t-throw-on-write-failure.patch +++ b/upstream_utils/fmt_patches/0001-Don-t-throw-on-write-failure.patch @@ -1,7 +1,7 @@ -From 6742d9385ef8ce677549186cde50c6173d503fac Mon Sep 17 00:00:00 2001 +From 752710e3aa2cb8ba601a501c98591fd06ab95cc4 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 18 May 2022 10:21:49 -0700 -Subject: [PATCH] Don't throw on write failure +Subject: [PATCH 1/2] Don't throw on write failure --- include/fmt/format-inl.h | 4 +--- @@ -10,7 +10,7 @@ Subject: [PATCH] Don't throw on write failure 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h -index f44df01c..d8906c9a 100644 +index f44df01..d8906c9 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -79,9 +79,7 @@ FMT_FUNC void report_error(format_func func, int error_code, @@ -25,7 +25,7 @@ index f44df01c..d8906c9a 100644 #ifndef FMT_STATIC_THOUSANDS_SEPARATOR diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h -index 2865b76e..5a062e80 100644 +index 2865b76..5a062e8 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -203,8 +203,7 @@ inline void vprint(std::FILE* f, wstring_view fmt, wformat_args args) { @@ -39,7 +39,7 @@ index 2865b76e..5a062e80 100644 inline void vprint(wstring_view fmt, wformat_args args) { diff --git a/src/os.cc b/src/os.cc -index f388ead0..2c499512 100644 +index f388ead..2c49951 100644 --- a/src/os.cc +++ b/src/os.cc @@ -277,8 +277,7 @@ std::size_t file::read(void* buffer, std::size_t count) { diff --git a/upstream_utils/fmt_patches/0002-Suppress-clang-tidy-warning-false-positive.patch b/upstream_utils/fmt_patches/0002-Suppress-clang-tidy-warning-false-positive.patch new file mode 100644 index 0000000000..f2c1b2a567 --- /dev/null +++ b/upstream_utils/fmt_patches/0002-Suppress-clang-tidy-warning-false-positive.patch @@ -0,0 +1,22 @@ +From 7d5472fbc65e876fc7c30974cdc1b5e87b99dc0f Mon Sep 17 00:00:00 2001 +From: Tyler Veness +Date: Thu, 18 Aug 2022 20:22:11 -0700 +Subject: [PATCH 2/2] Suppress clang-tidy warning false positive + +--- + include/fmt/core.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/fmt/core.h b/include/fmt/core.h +index 0e7843b..d60d2f6 100644 +--- a/include/fmt/core.h ++++ b/include/fmt/core.h +@@ -2921,7 +2921,7 @@ class format_string_checker { + basic_string_view format_str, ErrorHandler eh) + : context_(format_str, num_args, types_, eh), + parse_funcs_{&parse_format_specs...}, +- types_{type_constant::value...} {} ++ types_{type_constant::value...} {} // NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject) + + FMT_CONSTEXPR void on_text(const Char*, const Char*) {} + diff --git a/upstream_utils/update_fmt.py b/upstream_utils/update_fmt.py index 9ac9e9b519..8d5959ed82 100755 --- a/upstream_utils/update_fmt.py +++ b/upstream_utils/update_fmt.py @@ -17,7 +17,15 @@ def main(): # Apply patches to original git repo prefix = os.path.join(root, "upstream_utils/fmt_patches") - am_patches(repo, [os.path.join(prefix, "0001-Don-t-throw-on-write-failure.patch")]) + am_patches( + repo, + [ + os.path.join(prefix, "0001-Don-t-throw-on-write-failure.patch"), + os.path.join( + prefix, "0002-Suppress-clang-tidy-warning-false-positive.patch" + ), + ], + ) # Delete old install for d in [ diff --git a/wpiutil/src/main/native/thirdparty/fmtlib/include/fmt/core.h b/wpiutil/src/main/native/thirdparty/fmtlib/include/fmt/core.h index 0e7843b85f..d60d2f6ffa 100644 --- a/wpiutil/src/main/native/thirdparty/fmtlib/include/fmt/core.h +++ b/wpiutil/src/main/native/thirdparty/fmtlib/include/fmt/core.h @@ -2921,7 +2921,7 @@ class format_string_checker { basic_string_view format_str, ErrorHandler eh) : context_(format_str, num_args, types_, eh), parse_funcs_{&parse_format_specs...}, - types_{type_constant::value...} {} + types_{type_constant::value...} {} // NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject) FMT_CONSTEXPR void on_text(const Char*, const Char*) {}