Re: [PATCH] afs: Mark expected switch fall-throughs

2019-04-16 Thread David Howells
Kees Cook wrote: > > Can we fix the compiler, please, to say that *every* case (perhaps barring > > the last) is expected to fall through? I should say "... so that we can say that *every* case ...". David

Re: [PATCH] afs: Mark expected switch fall-throughs

2019-04-09 Thread Kees Cook
On Tue, Apr 9, 2019 at 2:28 AM David Howells wrote: > Kees Cook wrote: > > > These look good to me. Gets us another step to finishing this. :) > > Can we fix the compiler, please, to say that *every* case (perhaps barring the > last) is expected to fall through? Right now we're targeting both

Re: [PATCH] afs: Mark expected switch fall-throughs

2019-04-09 Thread David Howells
Gustavo A. R. Silva wrote: Please fix the compiler so that you can annotate a switch-statement to say that every case must fall through (except, perhaps, the last). > /* extract the FID array and its count in two steps */ > + /* fall through */ > case 1:

Re: [PATCH] afs: Mark expected switch fall-throughs

2019-04-09 Thread David Howells
Kees Cook wrote: > These look good to me. Gets us another step to finishing this. :) Can we fix the compiler, please, to say that *every* case (perhaps barring the last) is expected to fall through? David

Re: [PATCH] afs: Mark expected switch fall-throughs

2019-04-08 Thread Kees Cook
On Thu, Jan 10, 2019 at 2:02 PM Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Notice that in many cases I placed a /* Fall through */ comment > at the bottom of the case, which what GCC is expecting

[PATCH] afs: Mark expected switch fall-throughs

2019-01-10 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in many cases I placed a /* Fall through */ comment at the bottom of the case, which what GCC is expecting to find. In other cases I had to tweak a bit the format of the

[PATCH] afs: Mark expected switch fall-throughs

2018-10-17 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in many cases I placed a /* Fall through */ comment at the bottom of the case, which what GCC is expecting to find. In other cases I had to tweak a bit the format of the

[PATCH] afs: Mark expected switch fall-throughs

2018-10-17 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in many cases I placed a /* Fall through */ comment at the bottom of the case, which what GCC is expecting to find. In other cases I had to tweak a bit the format of the

Re: [PATCH] afs: Mark expected switch fall-throughs

2018-08-02 Thread David Howells
Gustavo A. R. Silva wrote: > + /* Fall through */ > no_msw: > /* extract the returned data length */ > case 2: That would appear to be added in the wrong place. The fall-through is after the no_msw label. > + > + /* Fall through */ >

Re: [PATCH] afs: Mark expected switch fall-throughs

2018-08-02 Thread David Howells
Gustavo A. R. Silva wrote: > + /* Fall through */ > no_msw: > /* extract the returned data length */ > case 2: That would appear to be added in the wrong place. The fall-through is after the no_msw label. > + > + /* Fall through */ >

[PATCH] afs: Mark expected switch fall-throughs

2018-07-31 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva --- fs/afs/cmservice.c | 10 -- fs/afs/file.c | 2 ++ fs/afs/fsclient.c | 41

[PATCH] afs: Mark expected switch fall-throughs

2018-07-31 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva --- fs/afs/cmservice.c | 10 -- fs/afs/file.c | 2 ++ fs/afs/fsclient.c | 41