git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fixes compile warning with -Wimplicit-fallthrough CFLAGS

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 23, 2018, 18:33 UTC
Message-ID
<xmqqd120ifvu.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20180123000727.GB26357@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
>> diff --git a/apply.c b/apply.c
>> index 321a9fa68..a22fb2881 100644
>> --- a/apply.c
>> +++ b/apply.c
>> @@ -1450,7 +1450,7 @@ static void recount_diff(const char *line, int size, struct fragment *fragment)
>>  		switch (*line) {
>>  		case ' ': case '\n':
>>  			newlines++;
>> -			/* fall through */
>> +			GIT_FALLTHROUGH;
>
> Ugh, the semi-colon there makes it look like it's actual code. If we go
> this route, I wonder if it's worth hiding it inside the macro.

What? You mean to shout in all caps without even terminating the line with any punctuation? Please don't---I am sure it will break auto indentation people rely on from their editors.

Previous: Jeff KingNext: Jeff King
Message 3 of 7 in “Fixes compile warning with -Wimplicit-fallthrough CFLAGS”
  1. Fixes compile warning with -Wimplicit-fallthrough CFLAGSElia Pinto, Jan 22, 2018
  2. Jeff KingJan 23, 2018
  3. Junio C HamanoJan 23, 2018
  4. Jeff KingJan 23, 2018
  5. Eric SunshineJan 23, 2018
  6. Jeff KingJan 23, 2018
  7. Jacob KellerJan 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.