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

2018-01-23 Thread Jeff King
On Tue, Jan 23, 2018 at 10:33:57AM -0800, Junio C Hamano wrote: > Jeff King 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,

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

2018-01-23 Thread Junio C Hamano
Jeff King 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) { >>

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

2018-01-22 Thread Jacob Keller
On Mon, Jan 22, 2018 at 4:59 PM, Jeff King wrote: > On Mon, Jan 22, 2018 at 07:54:18PM -0500, Eric Sunshine wrote: > >> On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto wrote: >> > This patch add explicit fallthrough compiler attribute >> > when needed on

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

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 07:54:18PM -0500, Eric Sunshine wrote: > On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto wrote: > > This patch add explicit fallthrough compiler attribute > > when needed on switch case statement eliminating > > the compile warning

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

2018-01-22 Thread Eric Sunshine
On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto wrote: > This patch add explicit fallthrough compiler attribute > when needed on switch case statement eliminating > the compile warning [-Werror=implicit-fallthrough=]. > It does this by means of a macro that takes into account

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

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 11:51:18PM +, Elia Pinto wrote: > This patch add explicit fallthrough compiler attribute > when needed on switch case statement eliminating > the compile warning [-Werror=implicit-fallthrough=]. > It does this by means of a macro that takes into account > the versions

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

2018-01-22 Thread Elia Pinto
This patch add explicit fallthrough compiler attribute when needed on switch case statement eliminating the compile warning [-Werror=implicit-fallthrough=]. It does this by means of a macro that takes into account the versions of the compilers that include that attribute. The fallthrough (or