Don't instantiate+init variables in a switch block.
Avoid compiler warning about (unnecessarily) initializing 2 variables during instantiation at the top of a switch block (but outside of any case statements): just declare the variables at the top of the outter block. They're already safely initialized, so don't worry about initializing them in the instantiation. Reviewed by Dave Goodell. cmr=v1.7.4:reviewer=ompi-rm1.7:subject=Don't instantiate+init variables in a switch block This commit was SVN r30228.
Этот коммит содержится в:
родитель
448a4707ce
Коммит
212e07a1e9
@ -1454,12 +1454,12 @@ static void dump_endpoint(ompi_btl_usnic_endpoint_t *endpoint)
|
||||
|
||||
OPAL_LIST_FOREACH(frag, &endpoint->endpoint_frag_send_queue,
|
||||
ompi_btl_usnic_frag_t) {
|
||||
ompi_btl_usnic_small_send_frag_t *ssfrag;
|
||||
ompi_btl_usnic_large_send_frag_t *lsfrag;
|
||||
|
||||
snprintf(str, sizeof(str), " --> frag %p, %s", (void *)frag,
|
||||
usnic_frag_type(frag->uf_type));
|
||||
switch (frag->uf_type) {
|
||||
ompi_btl_usnic_small_send_frag_t *ssfrag = NULL;
|
||||
ompi_btl_usnic_large_send_frag_t *lsfrag = NULL;
|
||||
|
||||
case OMPI_BTL_USNIC_FRAG_LARGE_SEND:
|
||||
lsfrag = (ompi_btl_usnic_large_send_frag_t *)frag;
|
||||
snprintf(tmp, sizeof(tmp), " tag=%"PRIu8" id=%"PRIu32" offset=%llu/%llu post_cnt=%"PRIu32" ack_bytes_left=%llu\n",
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user