Re: [RFC PATCH 4/6] sequencer.c: avoid empty statements at top level
- From
Beat Bolli <dev+git@drbeat.li>
- Date
- Jul 9, 2018, 21:37 UTC
- Message-ID
- <82fa7e95-5e27-bb8a-2fbf-4895bdfea05c@drbeat.li>
- In-Reply-To
- <xmqqo9fgayb6.fsf@gitster-ct.c.googlers.com>
On 09.07.18 23:34, Junio C Hamano wrote:
Show 22 quoted lines
> Beat Bolli <dev+git@drbeat.li> writes:
>
>> The marco GIT_PATH_FUNC expands to a complete statement including the
>> semicolon. Remove two extra trailing semicolons.
>
> Wait a bit. The observation in the log message and the
> implementation of GIT_PATH_FUNC() do not match.
>
> #define GIT_PATH_FUNC(func, filename) \
> const char *func(void) \
> { \
> static char *ret; \
> if (!ret) \
> ret = git_pathdup(filename); \
> return ret; \
> }
>
> The code generated does "include semicolon" but that is not why the
> caller should place semicolon after the closing parens. Perhaps
> replace "including the semicolon." with something else, like ", and
> adding a semicolon after it not only is unnecessary but is wrong."
> or soemthing like that?This message is fixed in the non-RFC series that I sent at 19:25 UTC. I noticed the error after the message from Philip Oakley.
Beat