Commit 74f79099 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva

adfs: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
parent e690c9e3
...@@ -24,8 +24,11 @@ static inline unsigned int adfs_readval(unsigned char *p, int len) ...@@ -24,8 +24,11 @@ static inline unsigned int adfs_readval(unsigned char *p, int len)
switch (len) { switch (len) {
case 4: val |= p[3] << 24; case 4: val |= p[3] << 24;
/* fall through */
case 3: val |= p[2] << 16; case 3: val |= p[2] << 16;
/* fall through */
case 2: val |= p[1] << 8; case 2: val |= p[1] << 8;
/* fall through */
default: val |= p[0]; default: val |= p[0];
} }
return val; return val;
...@@ -35,8 +38,11 @@ static inline void adfs_writeval(unsigned char *p, int len, unsigned int val) ...@@ -35,8 +38,11 @@ static inline void adfs_writeval(unsigned char *p, int len, unsigned int val)
{ {
switch (len) { switch (len) {
case 4: p[3] = val >> 24; case 4: p[3] = val >> 24;
/* fall through */
case 3: p[2] = val >> 16; case 3: p[2] = val >> 16;
/* fall through */
case 2: p[1] = val >> 8; case 2: p[1] = val >> 8;
/* fall through */
default: p[0] = val; default: p[0] = val;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment