Skip to content

Commit

Permalink
ch3: Remove unreachable statements
Browse files Browse the repository at this point in the history
  • Loading branch information
raffenet committed Jan 2, 2025
1 parent 2e0a8be commit 3acda18
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPIR_Request *req,
break;
default:
MPIR_ERR_INTERNALANDJUMP(mpi_errno, "unexpected request type");
break;
}

iov[0].iov_base = (void *) cookie_pkt;
Expand Down
5 changes: 2 additions & 3 deletions src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ void MPID_nem_dbg_dump_cell (volatile struct MPID_nem_cell *cell)

#define state_case(suffix) \
case MPIDI_VC_STATE_##suffix: \
return "MPIDI_VC_STATE_" #suffix; \
break
return "MPIDI_VC_STATE_" #suffix

static const char *vc_state_to_str(MPIDI_VC_State_t state)
{
Expand All @@ -37,7 +36,7 @@ static const char *vc_state_to_str(MPIDI_VC_State_t state)
state_case(CLOSED);
state_case(INACTIVE_CLOSED);
state_case(MORIBUND);
default: return "(invalid state)"; break;
default: return "(invalid state)";
}
}
#undef state_case
Expand Down
1 change: 0 additions & 1 deletion src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATT
break;
default:
MPIR_ERR_INTERNALANDJUMP(mpi_errno, "unexpected request type");
break;
}

*rreqp = NULL;
Expand Down
1 change: 0 additions & 1 deletion src/mpid/ch3/src/ch3u_handle_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ int MPIDI_CH3U_Handle_connection(MPIDI_VC_t * vc, MPIDI_VC_Event_t event)
MPI_ERR_INTERN, "**ch3|unhandled_connection_state",
"**ch3|unhandled_connection_state %p %d", vc, vc->state);
goto fn_fail;
break;
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/mpid/ch3/src/ch3u_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ static int MPIDI_Create_inter_root_communicator_connect(const char *port_name,
MPIDI_CH3I_PORT_CONNREQ_SET_STAT(connreq, REVOKE);
MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_PORT, "**ch3|conntimeout",
"**ch3|conntimeout %d", timeout);
break;

case MPIDI_CH3I_PORT_CONNREQ_ERR_CLOSE:
/* Unexpected port closing on server.
Expand All @@ -329,12 +328,10 @@ static int MPIDI_Create_inter_root_communicator_connect(const char *port_name,

MPIDI_CH3I_PORT_CONNREQ_SET_STAT(connreq, FREE);
MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_PORT, "**ch3|portclose");
break;

default:
/* Unexpected status, internal error. */
MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_INTERN, "**unknown");
break;
}

mpi_errno = MPIDI_CH3I_Initialize_tmp_comm(&tmp_comm, connect_vc, 1, port_name_tag);
Expand Down Expand Up @@ -446,7 +443,6 @@ static int MPIDI_Create_inter_root_communicator_accept(const char *port_name,
default:
/* report internal error -- unexpected state */
MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_INTERN, "**unknown");
break;
}
}

Expand Down

0 comments on commit 3acda18

Please sign in to comment.