git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im, "Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
	"Randall S. Becker" <rsbecker@nexbridge.com>
Subject: [PATCH] reftable: make REFTABLE_UNUSED C99 compatible
Date: Thu, 29 May 2025 03:11:36 -0700	[thread overview]
Message-ID: <20250529101136.16219-1-carenas@gmail.com> (raw)
In-Reply-To: <046901dbd002$a0c245c0$e246d140$@nexbridge.com>

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" <rsbecker@nexbridge.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 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
-- 
2.50.0.rc0.1.gb4243b6ac8


  reply	other threads:[~2025-05-29 10:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 18:59 Build Failure: Git 2.50.0-rc0 on NonStop rsbecker
2025-05-29 10:11 ` Carlo Marcelo Arenas Belón [this message]
2025-05-29 16:17   ` [PATCH] reftable: make REFTABLE_UNUSED C99 compatible Junio C Hamano
2025-05-29 23:13     ` brian m. carlson
2025-05-30  4:12       ` Junio C Hamano
2025-05-30  5:35     ` Patrick Steinhardt
2025-05-30  6:25       ` Jeff King
2025-05-30  8:47         ` Patrick Steinhardt
2025-05-30 16:28           ` Junio C Hamano
2025-05-30 12:04 ` [Bug] Build Failure: Git 2.50.0-rc0 on NonStop rsbecker
2025-05-30 14:19   ` Kristoffer Haugsbakk
2025-05-30 14:26   ` Patrick Steinhardt
2025-06-01  9:36     ` rsbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250529101136.16219-1-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).