Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 12ff498

Browse files
author
Ralph Castain
committed
Fix some inconsistencies in pmix_status_t vs int declarations. These have been fixed upstream, but we don't want to bring all that down.
Thanks to Paul Hargrove for pointing it out Try and catch the rest of the xlc complaints pmix/pmix112: Fix some int vs. pmix_status_t issues for XL compiler
1 parent f0e283d commit 12ff498

24 files changed

+353
-341
lines changed

opal/mca/pmix/pmix112/pmix/src/buffer_ops/copy.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "src/util/output.h"
2828
#include "src/buffer_ops/internal.h"
2929

30-
int pmix_bfrop_copy(void **dest, void *src, pmix_data_type_t type)
30+
pmix_status_t pmix_bfrop_copy(void **dest, void *src, pmix_data_type_t type)
3131
{
3232
pmix_bfrop_type_info_t *info;
3333

@@ -51,7 +51,7 @@ int pmix_bfrop_copy(void **dest, void *src, pmix_data_type_t type)
5151
return info->odti_copy_fn(dest, src, type);
5252
}
5353

54-
int pmix_bfrop_copy_payload(pmix_buffer_t *dest, pmix_buffer_t *src)
54+
pmix_status_t pmix_bfrop_copy_payload(pmix_buffer_t *dest, pmix_buffer_t *src)
5555
{
5656
size_t to_copy = 0;
5757
char *ptr;
@@ -80,7 +80,7 @@ int pmix_bfrop_copy_payload(pmix_buffer_t *dest, pmix_buffer_t *src)
8080
/*
8181
* STANDARD COPY FUNCTION - WORKS FOR EVERYTHING NON-STRUCTURED
8282
*/
83-
int pmix_bfrop_std_copy(void **dest, void *src, pmix_data_type_t type)
83+
pmix_status_t pmix_bfrop_std_copy(void **dest, void *src, pmix_data_type_t type)
8484
{
8585
size_t datasize;
8686
uint8_t *val = NULL;
@@ -156,7 +156,7 @@ int pmix_bfrop_std_copy(void **dest, void *src, pmix_data_type_t type)
156156
/*
157157
* STRING
158158
*/
159-
int pmix_bfrop_copy_string(char **dest, char *src, pmix_data_type_t type)
159+
pmix_status_t pmix_bfrop_copy_string(char **dest, char *src, pmix_data_type_t type)
160160
{
161161
if (NULL == src) { /* got zero-length string/NULL pointer - store NULL */
162162
*dest = NULL;
@@ -269,7 +269,7 @@ pmix_status_t pmix_value_xfer(pmix_value_t *p, pmix_value_t *src)
269269
}
270270

271271
/* PMIX_VALUE */
272-
int pmix_bfrop_copy_value(pmix_value_t **dest, pmix_value_t *src,
272+
pmix_status_t pmix_bfrop_copy_value(pmix_value_t **dest, pmix_value_t *src,
273273
pmix_data_type_t type)
274274
{
275275
pmix_value_t *p;
@@ -287,23 +287,23 @@ int pmix_bfrop_copy_value(pmix_value_t **dest, pmix_value_t *src,
287287
return pmix_value_xfer(p, src);
288288
}
289289

290-
int pmix_bfrop_copy_info(pmix_info_t **dest, pmix_info_t *src,
290+
pmix_status_t pmix_bfrop_copy_info(pmix_info_t **dest, pmix_info_t *src,
291291
pmix_data_type_t type)
292292
{
293293
*dest = (pmix_info_t*)malloc(sizeof(pmix_info_t));
294294
(void)strncpy((*dest)->key, src->key, PMIX_MAX_KEYLEN);
295295
return pmix_value_xfer(&(*dest)->value, &src->value);
296296
}
297297

298-
int pmix_bfrop_copy_buf(pmix_buffer_t **dest, pmix_buffer_t *src,
298+
pmix_status_t pmix_bfrop_copy_buf(pmix_buffer_t **dest, pmix_buffer_t *src,
299299
pmix_data_type_t type)
300300
{
301301
*dest = PMIX_NEW(pmix_buffer_t);
302302
pmix_bfrop.copy_payload(*dest, src);
303303
return PMIX_SUCCESS;
304304
}
305305

306-
int pmix_bfrop_copy_app(pmix_app_t **dest, pmix_app_t *src,
306+
pmix_status_t pmix_bfrop_copy_app(pmix_app_t **dest, pmix_app_t *src,
307307
pmix_data_type_t type)
308308
{
309309
size_t j;
@@ -323,7 +323,7 @@ int pmix_bfrop_copy_app(pmix_app_t **dest, pmix_app_t *src,
323323
return PMIX_SUCCESS;
324324
}
325325

326-
int pmix_bfrop_copy_kval(pmix_kval_t **dest, pmix_kval_t *src,
326+
pmix_status_t pmix_bfrop_copy_kval(pmix_kval_t **dest, pmix_kval_t *src,
327327
pmix_data_type_t type)
328328
{
329329
pmix_kval_t *p;
@@ -341,7 +341,7 @@ int pmix_bfrop_copy_kval(pmix_kval_t **dest, pmix_kval_t *src,
341341
return pmix_value_xfer(p->value, src->value);
342342
}
343343

344-
int pmix_bfrop_copy_array(pmix_info_array_t **dest,
344+
pmix_status_t pmix_bfrop_copy_array(pmix_info_array_t **dest,
345345
pmix_info_array_t *src,
346346
pmix_data_type_t type)
347347
{
@@ -356,7 +356,7 @@ int pmix_bfrop_copy_array(pmix_info_array_t **dest,
356356
return PMIX_SUCCESS;
357357
}
358358

359-
int pmix_bfrop_copy_proc(pmix_proc_t **dest, pmix_proc_t *src,
359+
pmix_status_t pmix_bfrop_copy_proc(pmix_proc_t **dest, pmix_proc_t *src,
360360
pmix_data_type_t type)
361361
{
362362
*dest = (pmix_proc_t*)malloc(sizeof(pmix_proc_t));
@@ -369,7 +369,7 @@ int pmix_bfrop_copy_proc(pmix_proc_t **dest, pmix_proc_t *src,
369369
}
370370

371371
#if PMIX_HAVE_HWLOC
372-
int pmix_bfrop_copy_topo(hwloc_topology_t *dest,
372+
pmix_status_t pmix_bfrop_copy_topo(hwloc_topology_t *dest,
373373
hwloc_topology_t src,
374374
pmix_data_type_t type)
375375
{
@@ -378,7 +378,7 @@ int pmix_bfrop_copy_topo(hwloc_topology_t *dest,
378378
}
379379
#endif
380380

381-
int pmix_bfrop_copy_modex(pmix_modex_data_t **dest, pmix_modex_data_t *src,
381+
pmix_status_t pmix_bfrop_copy_modex(pmix_modex_data_t **dest, pmix_modex_data_t *src,
382382
pmix_data_type_t type)
383383
{
384384
*dest = (pmix_modex_data_t*)malloc(sizeof(pmix_modex_data_t));
@@ -398,7 +398,7 @@ int pmix_bfrop_copy_modex(pmix_modex_data_t **dest, pmix_modex_data_t *src,
398398
return PMIX_SUCCESS;
399399
}
400400

401-
int pmix_bfrop_copy_persist(pmix_persistence_t **dest, pmix_persistence_t *src,
401+
pmix_status_t pmix_bfrop_copy_persist(pmix_persistence_t **dest, pmix_persistence_t *src,
402402
pmix_data_type_t type)
403403
{
404404
*dest = (pmix_persistence_t*)malloc(sizeof(pmix_persistence_t));
@@ -409,7 +409,7 @@ int pmix_bfrop_copy_persist(pmix_persistence_t **dest, pmix_persistence_t *src,
409409
return PMIX_SUCCESS;
410410
}
411411

412-
int pmix_bfrop_copy_bo(pmix_byte_object_t **dest, pmix_byte_object_t *src,
412+
pmix_status_t pmix_bfrop_copy_bo(pmix_byte_object_t **dest, pmix_byte_object_t *src,
413413
pmix_data_type_t type)
414414
{
415415
*dest = (pmix_byte_object_t*)malloc(sizeof(pmix_byte_object_t));
@@ -422,7 +422,7 @@ int pmix_bfrop_copy_bo(pmix_byte_object_t **dest, pmix_byte_object_t *src,
422422
return PMIX_SUCCESS;
423423
}
424424

425-
int pmix_bfrop_copy_pdata(pmix_pdata_t **dest, pmix_pdata_t *src,
425+
pmix_status_t pmix_bfrop_copy_pdata(pmix_pdata_t **dest, pmix_pdata_t *src,
426426
pmix_data_type_t type)
427427
{
428428
*dest = (pmix_pdata_t*)malloc(sizeof(pmix_pdata_t));

0 commit comments

Comments
 (0)