git: a4be34bc81a3 - main - devel/protozero: fix build with clang 19

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Fri, 08 Nov 2024 16:07:02 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a4be34bc81a30016a9a7eb22ae0509fb505775ee

commit a4be34bc81a30016a9a7eb22ae0509fb505775ee
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2024-11-08 15:31:50 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2024-11-08 15:34:00 +0000

    devel/protozero: fix build with clang 19
    
    PR:             282475
    Submitted by:   dim
---
 devel/protozero/files/patch-test_catch_catch.hpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/devel/protozero/files/patch-test_catch_catch.hpp b/devel/protozero/files/patch-test_catch_catch.hpp
new file mode 100644
index 000000000000..5a58a92c951e
--- /dev/null
+++ b/devel/protozero/files/patch-test_catch_catch.hpp
@@ -0,0 +1,18 @@
+--- test/catch/catch.hpp.orig	2022-01-10 10:02:41 UTC
++++ test/catch/catch.hpp
+@@ -175,8 +175,13 @@ namespace Catch {
+ #    define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
+          _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" )
+ 
+-#    define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+-         _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
++#    if __clang_major__ >= 19
++#      define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
++           _Pragma( "clang diagnostic ignored \"-Wc++20-extensions\"" )
++#    else
++#      define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
++           _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
++#endif
+ 
+ #    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+          _Pragma( "clang diagnostic ignored \"-Wunused-template\"" )