Skip to content

v5.0.x: compiler warning fixes #9830

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 2 commits into from
Jan 6, 2022
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
18 changes: 9 additions & 9 deletions opal/mca/btl/base/btl_base_am_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2011-2018 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2020-2021 Google, LLC. All rights reserved.
* Copyright (c) 2021 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2021-2022 Cisco Systems, Inc. All rights reserved
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -976,15 +976,16 @@ static void mca_btl_base_am_process_atomic(mca_btl_base_module_t *btl,
switch (hdr->type) {
case MCA_BTL_BASE_AM_ATOMIC:
if (4 == hdr->data.atomic.size) {
uint32_t tmp = (uint32_t) atomic_response;
mca_btl_base_am_atomic_32(&tmp, (opal_atomic_int32_t *) (uintptr_t) hdr->target_address,
int32_t tmp = (int32_t) atomic_response;
mca_btl_base_am_atomic_32(&tmp, (opal_atomic_int32_t *) hdr->target_address,
hdr->data.atomic.op);
atomic_response = tmp;
}
if (8 == hdr->data.atomic.size) {
mca_btl_base_am_atomic_64(&atomic_response,
(opal_atomic_int64_t *) (uintptr_t) hdr->target_address,
} else if (8 == hdr->data.atomic.size) {
int64_t tmp = (int64_t) atomic_response;
mca_btl_base_am_atomic_64(&tmp,
(opal_atomic_int64_t *) hdr->target_address,
hdr->data.atomic.op);
atomic_response = tmp;
}
break;
case MCA_BTL_BASE_AM_CAS:
Expand All @@ -993,8 +994,7 @@ static void mca_btl_base_am_process_atomic(mca_btl_base_module_t *btl,
opal_atomic_compare_exchange_strong_32((opal_atomic_int32_t *) hdr->target_address,
&tmp, (int32_t) hdr->data.atomic.operand[1]);
atomic_response = tmp;
}
if (8 == hdr->data.atomic.size) {
} else if (8 == hdr->data.atomic.size) {
opal_atomic_compare_exchange_strong_64((opal_atomic_int64_t *) hdr->target_address,
&atomic_response, hdr->data.atomic.operand[1]);
}
Expand Down
3 changes: 2 additions & 1 deletion opal/util/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* Copyright (c) 2022 Cisco Systems, Inc. All rights reserved
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -127,7 +128,7 @@ OPAL_DECLSPEC void *opal_realloc(void *ptr, size_t size, const char *file, int l
* to configure (or by default if you're building in a SVN
* checkout).
*/
OPAL_DECLSPEC void opal_free(void *addr, const char *file, int line) __opal_attribute_nonnull__(1);
OPAL_DECLSPEC void opal_free(void *addr, const char *file, int line);

/**
* Used to set the debug level for malloc debug.
Expand Down
5 changes: 1 addition & 4 deletions opal/util/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2022 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
* Copyright (c) 2019 Triad National Security, LLC. All rights
Expand Down Expand Up @@ -640,7 +640,6 @@ int opal_util_register_stackhandlers(void)
set_stacktrace_filename();
opal_stacktrace_output_fileno = -1;
} else if (0 == strncasecmp(opal_stacktrace_output_filename, "file:", 5)) {
char *filename_cpy = NULL;
next = strchr(opal_stacktrace_output_filename, ':');
next++; // move past the ':' to the filename specified

Expand All @@ -654,8 +653,6 @@ int opal_util_register_stackhandlers(void)
sizeof(char) * opal_stacktrace_output_filename_max_len);
set_stacktrace_filename();
opal_stacktrace_output_fileno = -1;

free(filename_cpy);
} else {
opal_stacktrace_output_fileno = fileno(stderr);
}
Expand Down