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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

>> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux