Skip to content

Commit

Permalink
Comment intentional switch fallthroughs
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman committed Sep 7, 2016
1 parent ad26560 commit 85a871d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions toxav/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}
Expand Down
4 changes: 2 additions & 2 deletions toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ void m_callback_log(Messenger *m, logger_cb *function, void *userdata)
void m_callback_friendrequest(Messenger *m, void (*function)(Messenger *m, const uint8_t *, const uint8_t *, size_t,
void *))
{
callback_friendrequest(&(m->fr), (void (*)(void *, const uint8_t *, const uint8_t *, size_t, void *))function, m);
callback_friendrequest(&(m->fr), (void ( *)(void *, const uint8_t *, const uint8_t *, size_t, void *))function, m);
}

/* Set the function that will be executed when a message from a friend is received. */
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85a871d

Please sign in to comment.