On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto <gitter.spi...@gmail.com> 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 of the compilers that include that attribute. > [...] > Signed-off-by: Elia Pinto <gitter.spi...@gmail.com> > --- > diff --git a/convert.c b/convert.c > @@ -1554,7 +1554,7 @@ static int ident_filter_fn(struct stream_filter *filter, > switch (ident->state) { > default: > strbuf_add(&ident->left, head, ident->state); > - /* fallthrough */ > + GIT_FALLTHROUGH; > case IDENT_SKIPPING: > /* fallthrough */
Why doesn't this /* fallthrough */ deserve the same treatment? > case IDENT_DRAINING: