Skip to content

Commit 7bea824

Browse files
author
Ralph Castain
authored
Merge pull request #3813 from rhc54/topic/esh
Replace syntax with something less strictly C99
2 parents e7a44a1 + 31130a4 commit 7bea824

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

ompi/mca/pml/base/pml_base_sendreq.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* and Technology (RIST). All rights reserved.
1616
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights
1717
* reserved.
18+
* Copyright (c) 2017 Intel, Inc. All rights reserved.
1819
* $COPYRIGHT$
1920
*
2021
* Additional copyrights may follow
@@ -115,8 +116,9 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION( mca_pml_base_send_request_t );
115116

116117
#define MCA_PML_BASE_SEND_REQUEST_RESET(request) \
117118
if ((request)->req_bytes_packed > 0) { \
119+
size_t cnt = 0; \
118120
opal_convertor_set_position(&(sendreq)->req_send.req_base.req_convertor, \
119-
&(size_t){0}); \
121+
&cnt); \
120122
}
121123

122124
/**
@@ -153,4 +155,3 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION( mca_pml_base_send_request_t );
153155
END_C_DECLS
154156

155157
#endif
156-

opal/mca/btl/ugni/btl_ugni_add_procs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2011-2017 Los Alamos National Security, LLC. All rights
44
* reserved.
55
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
6-
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
6+
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
77
* $COPYRIGHT$
88
*
99
* Additional copyrights may follow
@@ -35,6 +35,7 @@ int mca_btl_ugni_add_procs (struct mca_btl_base_module_t* btl, size_t nprocs,
3535
mca_btl_ugni_module_t *ugni_module = (mca_btl_ugni_module_t *) btl;
3636
int rc;
3737
void *mmap_start_addr;
38+
struct timeval tv = {.tv_sec = 0, .tv_usec = MCA_BTL_UGNI_CONNECT_USEC};
3839

3940
if (false == ugni_module->initialized) {
4041

@@ -156,7 +157,7 @@ int mca_btl_ugni_add_procs (struct mca_btl_base_module_t* btl, size_t nprocs,
156157
mca_btl_ugni_spawn_progress_thread(btl);
157158
}
158159

159-
opal_event_evtimer_add (&ugni_module->connection_event, (&(struct timeval) {.tv_sec = 0, .tv_usec = MCA_BTL_UGNI_CONNECT_USEC}));
160+
opal_event_evtimer_add (&ugni_module->connection_event, &tv);
160161

161162
ugni_module->initialized = true;
162163
}

opal/mca/btl/ugni/btl_ugni_module.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ static void mca_btl_ugni_datagram_event (int foo, short bar, void *arg)
6666
{
6767
mca_btl_ugni_module_t *ugni_module = (mca_btl_ugni_module_t *) arg;
6868
mca_btl_ugni_device_t *device = ugni_module->devices;
69+
struct timeval tv = {.tv_sec = 0, .tv_usec = MCA_BTL_UGNI_CONNECT_USEC};
6970

7071
mca_btl_ugni_progress_datagram (device);
7172

72-
opal_event_evtimer_add (&ugni_module->connection_event, (&(struct timeval) {.tv_sec = 0, .tv_usec = MCA_BTL_UGNI_CONNECT_USEC}));
73+
opal_event_evtimer_add (&ugni_module->connection_event, &tv);
7374
}
7475

7576
int

opal/mca/pmix/cray/pmix_cray.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,8 @@ static void fencenb(int sd, short args, void *cbdata)
784784
}
785785

786786
/* unpack and stuff in to the dstore */
787-
while (OPAL_SUCCESS == (rc = opal_dss.unpack(buf, &kp, &(int){1}, OPAL_VALUE))) {
787+
cnt = 1;
788+
while (OPAL_SUCCESS == (rc = opal_dss.unpack(buf, &kp, &cnt, OPAL_VALUE))) {
788789
OPAL_OUTPUT_VERBOSE((20, opal_pmix_base_framework.framework_output,
789790
"%s pmix:cray unpacked kp with key %s type(%d) for id %s",
790791
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), kp->key, kp->type, OPAL_NAME_PRINT(id)));
@@ -794,6 +795,7 @@ static void fencenb(int sd, short args, void *cbdata)
794795
goto fn_exit;
795796
}
796797
OBJ_RELEASE(kp);
798+
cnt = 1;
797799
}
798800

799801
cptr += r_bytes_and_ranks[i].nbytes;

opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,7 @@ pmix_status_t pmix_bfrop_store_data_type(pmix_buffer_t *buffer, pmix_data_type_t
112112

113113
pmix_status_t pmix_bfrop_get_data_type(pmix_buffer_t *buffer, pmix_data_type_t *type)
114114
{
115-
return pmix_bfrop_unpack_datatype(buffer, type, &(int32_t){1}, PMIX_DATA_TYPE);
115+
int32_t cnt = 1;
116+
117+
return pmix_bfrop_unpack_datatype(buffer, type, &cnt, PMIX_DATA_TYPE);
116118
}

opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2428,6 +2428,7 @@ static int _store_data_for_rank(ns_track_elem_t *ns_info, pmix_rank_t rank, pmix
24282428
rank_meta_info *rinfo = NULL;
24292429
size_t num_elems, free_offset, new_free_offset;
24302430
int data_exist;
2431+
int32_t cnt;
24312432

24322433
PMIX_OUTPUT_VERBOSE((10, pmix_globals.debug_output,
24332434
"%s:%d:%s: for rank %u", __FILE__, __LINE__, __func__, rank));
@@ -2458,7 +2459,8 @@ static int _store_data_for_rank(ns_track_elem_t *ns_info, pmix_rank_t rank, pmix
24582459
*/
24592460
free_offset = get_free_offset(datadesc);
24602461
kp = PMIX_NEW(pmix_kval_t);
2461-
while (PMIX_SUCCESS == (rc = pmix_bfrop.unpack(buf, kp, &(int){1}, PMIX_KVAL))) {
2462+
cnt = 1;
2463+
while (PMIX_SUCCESS == (rc = pmix_bfrop.unpack(buf, kp, &cnt, PMIX_KVAL))) {
24622464
pmix_output_verbose(2, pmix_globals.debug_output,
24632465
"pmix: unpacked key %s", kp->key);
24642466
if (PMIX_SUCCESS != (rc = pmix_sm_store(ns_info, rank, kp, &rinfo, data_exist))) {

0 commit comments

Comments
 (0)