Skip to content

Fix some compiler warnings #12685

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 4 commits into from
Aug 10, 2024
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: 1 addition & 4 deletions ompi/communicator/comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,10 +1509,7 @@ static int ompi_comm_idup_with_info_activate (ompi_comm_request_t *request)

static int ompi_comm_idup_with_info_finish (ompi_comm_request_t *request)
{
ompi_comm_idup_with_info_context_t *context =
(ompi_comm_idup_with_info_context_t *) request->context;

/* done */
/* nothing to be done */
return MPI_SUCCESS;
}

Expand Down
3 changes: 1 addition & 2 deletions ompi/mca/coll/base/coll_base_allreduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,6 @@ int ompi_coll_base_allreduce_intra_allgather_reduce(const void *sbuf, void *rbuf
ptrdiff_t extent, lb;
ompi_datatype_get_extent(dtype, &lb, &extent);

int rank = ompi_comm_rank(comm);
int size = ompi_comm_size(comm);

sendtmpbuf = (char*) sbuf;
Expand Down Expand Up @@ -1337,7 +1336,7 @@ int ompi_coll_base_allreduce_intra_allgather_reduce(const void *sbuf, void *rbuf
tmpsend_start = NULL;
}
OPAL_OUTPUT((ompi_coll_base_framework.framework_output, "%s:%4d\tError occurred %d, rank %2d",
__FILE__, line, err, rank));
__FILE__, line, err, ompi_comm_rank(comm)));
(void)line; // silence compiler warning
return err;

Expand Down
6 changes: 3 additions & 3 deletions ompi/mpi/fortran/base/fint_2_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/

#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a = NULL
#define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2) int (*c_##a)[dim2]
#define OMPI_SINGLE_NAME_DECL(a)
#define OMPI_ARRAY_NAME_CONVERT(a) c_##a
Expand All @@ -50,7 +50,7 @@
#define OMPI_ARRAY_INT_2_FINT(in, n)

#elif OMPI_SIZEOF_FORTRAN_INTEGER > SIZEOF_INT
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a = NULL
#define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2) int (*c_##a)[dim2], dim2_index
#define OMPI_SINGLE_NAME_DECL(a) int c_##a
#define OMPI_ARRAY_NAME_CONVERT(a) c_##a
Expand Down Expand Up @@ -107,7 +107,7 @@
free(OMPI_ARRAY_NAME_CONVERT(in)); \
} while (0)
#else /* int > MPI_Fint */
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a
#define OMPI_ARRAY_NAME_DECL(a) int *c_##a = NULL
#define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2) int (*c_##a)[dim2], dim2_index
#define OMPI_SINGLE_NAME_DECL(a) int c_##a
#define OMPI_ARRAY_NAME_CONVERT(a) c_##a
Expand Down
4 changes: 2 additions & 2 deletions opal/mca/smsc/xpmem/smsc_xpmem_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ static int mca_smsc_xpmem_component_query(void)
char buffer[1024];
uintptr_t address_max = 0;
while (fgets(buffer, sizeof(buffer), fh)) {
uintptr_t low, high;
uintptr_t high;
char *tmp;
/* each line of /proc/self/maps starts with low-high in hexadecimal (without a 0x) */
low = strtoul(buffer, &tmp, 16);
strtoul(buffer, &tmp, 16);
high = strtoul(tmp + 1, NULL, 16);
if (address_max < high) {
address_max = high;
Expand Down
Loading