From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>, git@vger.kernel.org
Cc: pclouds@gmail.com, peff@peff.net, chriscool@tuxfamily.org, l.s.r@web.de
Subject: Re: [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)
Date: Thu, 25 Oct 2018 22:08:42 +0100 [thread overview]
Message-ID: <d5b54ed8-689b-6f12-5888-fb598db8f083@ramsayjones.plus.com> (raw)
In-Reply-To: <b6fe7e58-5b3f-f139-be8d-210526a26767@ramsayjones.plus.com>
On 25/10/2018 19:54, Ramsay Jones wrote:
>
>
> On 25/10/2018 12:04, Carlo Marcelo Arenas Belón wrote:
>> struct commmit needs to be defined before commit-slab can generate
>> working code, object_id should be at least known through a forward
>> declaration
>>
>> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
>> ---
>> commit-slab-impl.h | 2 ++
>> commit-slab.h | 2 ++
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/commit-slab-impl.h b/commit-slab-impl.h
>> index e352c2f8c1..db7cf3f19b 100644
>> --- a/commit-slab-impl.h
>> +++ b/commit-slab-impl.h
>> @@ -1,6 +1,8 @@
>> #ifndef COMMIT_SLAB_IMPL_H
>> #define COMMIT_SLAB_IMPL_H
>>
>> +#include "commit.h"
>> +
>> #define implement_static_commit_slab(slabname, elemtype) \
>> implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static)
>>
>> diff --git a/commit-slab.h b/commit-slab.h
>> index 69bf0c807c..722252de61 100644
>> --- a/commit-slab.h
>> +++ b/commit-slab.h
>> @@ -1,6 +1,8 @@
>> #ifndef COMMIT_SLAB_H
>> #define COMMIT_SLAB_H
>>
>> +struct object_id;
>> +
>> #include "commit-slab-decl.h"
>> #include "commit-slab-impl.h"
>>
>>
>
> Hmm, sorry, I don't see how this patch has anything to do
> with the other two patches! ;-)
>
> Also, I have a patch to fix up the 'commit-reach.h' header
> (it was part of my original series, just had to update the
> commit message), which adds these very #includes and forward
> declarations when _using_ the commit-slab.
>
> I haven't tried applying your patches yet, which may answer
> my questions, so I am a little puzzled.
So, having now applied your patches, I still don't see what this
patch has to do with the others! I suppose it is dependent on the
compiler/version? (the most up-to-date version of clang available
to me is 5.0.1).
Yes, this will 'fix' the 'commit-reach.h' header (not surprising),
but I prefer my patch. ;-)
Still puzzled.
ATB,
Ramsay Jones
next prev parent reply other threads:[~2018-10-25 21:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 11:04 [PATCH v3 0/3] delta-islands: avoid unused function messages Carlo Marcelo Arenas Belón
2018-10-25 11:04 ` [PATCH v3 1/3] commit-slab: move MAYBE_UNUSED into git-compat-util Carlo Marcelo Arenas Belón
2018-10-25 11:04 ` [PATCH v3 2/3] khash: silence -Wunused-function in delta-islands from khash Carlo Marcelo Arenas Belón
2018-10-25 11:30 ` SZEDER Gábor
2018-10-25 11:04 ` [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check) Carlo Marcelo Arenas Belón
2018-10-25 18:54 ` Ramsay Jones
2018-10-25 21:08 ` Ramsay Jones [this message]
2018-10-26 3:15 ` Carlo Arenas
2018-10-27 1:45 ` Ramsay Jones
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=d5b54ed8-689b-6f12-5888-fb598db8f083@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=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).