Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment intentional switch fallthroughs #110

Merged
merged 1 commit into from
Sep 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion toxcore/Messenger.c
Original file line number Diff line number Diff line change
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