From 27a162608469b4dacd251b703ca2b9867bd7c0d3 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Wed, 7 Sep 2016 17:48:01 -0400 Subject: [PATCH] Comment intentional switch fallthroughs --- toxav/msi.c | 4 ++-- toxcore/Messenger.c | 2 +- toxcore/tox.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toxav/msi.c b/toxav/msi.c index 76c727a9..505a7df5 100644 --- a/toxav/msi.c +++ b/toxav/msi.c @@ -682,7 +682,7 @@ void handle_init (MSICall *call, const MSIMessage *msg) } break; - case msi_CallRequested: + case msi_CallRequested: // fall-through case msi_CallRequesting: { LOGGER_WARNING(call->session->messenger->log, "Session: %p Invalid state on 'init'"); call->error = msi_EInvalidState; @@ -738,7 +738,7 @@ void handle_push (MSICall *call, const MSIMessage *msg) break; /* Pushes during initialization state are ignored */ - case msi_CallInactive: + case msi_CallInactive: // fall-through case msi_CallRequested: { LOGGER_WARNING(call->session->messenger->log, "Ignoring invalid push"); } diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 7ec2ad01..e892779c 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -2158,7 +2158,7 @@ static int handle_packet(void *object, int i, const uint8_t *temp, uint16_t len, break; } - case PACKET_ID_MESSAGE: + case PACKET_ID_MESSAGE: // fall-through case PACKET_ID_ACTION: { if (data_length == 0) { break; diff --git a/toxcore/tox.c b/toxcore/tox.c index 26fa0de4..b155c02f 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -1058,7 +1058,7 @@ bool tox_file_seek(Tox *tox, uint32_t friend_number, uint32_t file_number, uint6 SET_ERROR_PARAMETER(error, TOX_ERR_FILE_SEEK_NOT_FOUND); return 0; - case -4: + case -4: // fall-through case -5: SET_ERROR_PARAMETER(error, TOX_ERR_FILE_SEEK_DENIED); return 0;