From f1228cd12c129a7e4da317e1d21741a3ec26e07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Thu, 29 May 2025 03:11:36 -0700 Subject: [PATCH] reftable: make REFTABLE_UNUSED C99 compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since f93b2a0424 (reftable/basics: introduce `REFTABLE_UNUSED` annotation, 2025-02-18), the reftable library was migrated to use an internal version of `UNUSED`, which unconditionally sets a GNU __attribute__ to avoid warnings function parameters that are not being used. Make the definition conditional to prevent breaking the build with non GNU compilers. Reported-by: "Randall S. Becker" Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- reftable/basics.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reftable/basics.h b/reftable/basics.h index d8888c1262..7d22f96261 100644 --- a/reftable/basics.h +++ b/reftable/basics.h @@ -16,7 +16,11 @@ #include "system.h" #include "reftable-basics.h" +#ifdef __GNUC__ #define REFTABLE_UNUSED __attribute__((__unused__)) +#else +#define REFTABLE_UNUSED +#endif /* * Initialize the buffer such that it is ready for use. This is equivalent to