Skip to contentSkip to conversation

net: af_unix: mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Oct 20, 2017 – Oct 22, 2017

Subsystems (3)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: af_unix: mark expected switch fall-through

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

---
This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through.

 net/unix/af_unix.c | 1 +
 1 file changed, 1 insertion(+)
net/unix/af_unix.c +1 -0
index 7f46bab..a9ee634 100644
@@ -814,6 +814,7 @@ static int unix_create(struct net *net, struct socket *sock, int protocol,
 		 */
 	case SOCK_RAW:
 		sock->type = SOCK_DGRAM;
+		/* fall through */
 	case SOCK_DGRAM:
 		sock->ops = &unix_dgram_ops;
 		break;
Signature · 1 line
2.7.4