From: Carlo Arenas <carenas@gmail.com>
To: peff@peff.net
Cc: git@vger.kernel.org, pclouds@gmail.com, chriscool@tuxfamily.org,
l.s.r@web.de
Subject: Re: [PATCH v2 1/2] commit-slabs: move MAYBE_UNUSED out
Date: Tue, 23 Oct 2018 16:02:22 -0700 [thread overview]
Message-ID: <CAPUEspiAhmJ5+qTUcA6x+eSPc9jmOLdF7QsSsSfwJSy5r=06PA@mail.gmail.com> (raw)
In-Reply-To: <20181023220019.GA31613@sigill.intra.peff.net>
On Tue, Oct 23, 2018 at 3:00 PM Jeff King <peff@peff.net> wrote:
> On Tue, Oct 23, 2018 at 02:50:19PM -0700, Carlo Marcelo Arenas Belón wrote:
> > #define implement_static_commit_slab(slabname, elemtype) \
> > - implement_commit_slab(slabname, elemtype, static MAYBE_UNUSED)
> > + implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static)
>
> Is this hunk necessary?
it works eitherway but the proposed syntax is IMHO better aligned
(when used in a function definition) as it matches better the syntax
from C++ attribute: maybe_unused (since C++17) [1]
__attribute__(unused) (the GCC extension) is meant to be applied to
function declarations, but we are not generating those.
Carlo
[1] https://en.cppreference.com/w/cpp/language/attributes/maybe_unused
next prev parent reply other threads:[~2018-10-23 23:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 11:34 [PATCH] khash: silence -Wunused-function Carlo Marcelo Arenas Belón
2018-10-23 15:44 ` Duy Nguyen
2018-10-23 21:50 ` [PATCH v2 0/2] delta-islands: avoid unused function messages Carlo Marcelo Arenas Belón
2018-10-23 21:50 ` [PATCH v2 1/2] commit-slabs: move MAYBE_UNUSED out Carlo Marcelo Arenas Belón
2018-10-23 22:00 ` Jeff King
2018-10-23 23:02 ` Carlo Arenas [this message]
2018-10-23 21:50 ` [PATCH v2 2/2] khash: silence -Wunused-function for delta-islands Carlo Marcelo Arenas Belón
2018-10-23 16:19 ` [PATCH] khash: silence -Wunused-function René Scharfe
2018-10-23 16:52 ` Carlo Arenas
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='CAPUEspiAhmJ5+qTUcA6x+eSPc9jmOLdF7QsSsSfwJSy5r=06PA@mail.gmail.com' \
--to=carenas@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/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).