Skip to content

Replace syntax with something less strictly C99 #3813

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

Merged
merged 1 commit into from
Jul 6, 2017
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
5 changes: 3 additions & 2 deletions ompi/mca/pml/base/pml_base_sendreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -115,8 +116,9 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION( mca_pml_base_send_request_t );

#define MCA_PML_BASE_SEND_REQUEST_RESET(request) \
if ((request)->req_bytes_packed > 0) { \
size_t cnt = 0; \
opal_convertor_set_position(&(sendreq)->req_send.req_base.req_convertor, \
&(size_t){0}); \
&cnt); \
}

/**
Expand Down Expand Up @@ -153,4 +155,3 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION( mca_pml_base_send_request_t );
END_C_DECLS

#endif

5 changes: 3 additions & 2 deletions opal/mca/btl/ugni/btl_ugni_add_procs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2011-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -35,6 +35,7 @@ int mca_btl_ugni_add_procs (struct mca_btl_base_module_t* btl, size_t nprocs,
mca_btl_ugni_module_t *ugni_module = (mca_btl_ugni_module_t *) btl;
int rc;
void *mmap_start_addr;
struct timeval tv = {.tv_sec = 0, .tv_usec = MCA_BTL_UGNI_CONNECT_USEC};

if (false == ugni_module->initialized) {

Expand Down Expand Up @@ -156,7 +157,7 @@ int mca_btl_ugni_add_procs (struct mca_btl_base_module_t* btl, size_t nprocs,
mca_btl_ugni_spawn_progress_thread(btl);
}

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

ugni_module->initialized = true;
}
Expand Down
3 changes: 2 additions & 1 deletion opal/mca/btl/ugni/btl_ugni_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ static void mca_btl_ugni_datagram_event (int foo, short bar, void *arg)
{
mca_btl_ugni_module_t *ugni_module = (mca_btl_ugni_module_t *) arg;
mca_btl_ugni_device_t *device = ugni_module->devices;
struct timeval tv = {.tv_sec = 0, .tv_usec = MCA_BTL_UGNI_CONNECT_USEC};

mca_btl_ugni_progress_datagram (device);

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

int
Expand Down
4 changes: 3 additions & 1 deletion opal/mca/pmix/cray/pmix_cray.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@ static void fencenb(int sd, short args, void *cbdata)
}

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

cptr += r_bytes_and_ranks[i].nbytes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,7 @@ pmix_status_t pmix_bfrop_store_data_type(pmix_buffer_t *buffer, pmix_data_type_t

pmix_status_t pmix_bfrop_get_data_type(pmix_buffer_t *buffer, pmix_data_type_t *type)
{
return pmix_bfrop_unpack_datatype(buffer, type, &(int32_t){1}, PMIX_DATA_TYPE);
int32_t cnt = 1;

return pmix_bfrop_unpack_datatype(buffer, type, &cnt, PMIX_DATA_TYPE);
}
4 changes: 3 additions & 1 deletion opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2428,6 +2428,7 @@ static int _store_data_for_rank(ns_track_elem_t *ns_info, pmix_rank_t rank, pmix
rank_meta_info *rinfo = NULL;
size_t num_elems, free_offset, new_free_offset;
int data_exist;
int32_t cnt;

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