summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpi.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2022-06-22 16:16:30 (GMT)
committerGitHub <noreply@github.com>2022-06-22 16:16:30 (GMT)
commit8b2e7b32b5b9987938ebf6936205f324bc5050b8 (patch)
tree17062db1b0521cbe22e759c5083b216ae6c62437 /src/H5FDmpi.c
parent55f4cc0caa69d65c505e926fb7b2568ab1a76c58 (diff)
downloadhdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.zip
hdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.tar.gz
hdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.tar.bz2
Various warning fixes (#1812)
* Fixed -Wreserved-id-macro warnings from header include guards * Removed all __int64 and LL suffix stuff now that C99 is minimum requirement * Rename `H5FD_CTL__` to `H5FD_CTL_` to fix -Wreserved-id-macro warnings Double underscore is reserved in C++ and this public header should be C++ compatible. * Never define __STDC_FORMAT_MACROS anymore Defining it causes a -Wreserved-id-macro. Happily, according to the C++11 standard: "The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++." https://cplusplus.github.io/LWG/issue984 So looks like it's not necessary to define it with reasonably new toolchains. * Fixed some -Wunused-macros warnings, removed dead code * Fixed all -Wdouble-promotion warnings in C++ files * Fixed remaining -Wsuggest-destructor-override warnings * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5FDmpi.c')
-rw-r--r--src/H5FDmpi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 7eb1463..45791e8 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -57,7 +57,7 @@ int
H5FD_mpi_get_rank(H5FD_t *file)
{
const H5FD_class_t *cls;
- uint64_t flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
int rank = -1;
void * rank_ptr = (void *)(&rank);
int ret_value;
@@ -70,7 +70,7 @@ H5FD_mpi_get_rank(H5FD_t *file)
HDassert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((cls->ctl)(file, H5FD_CTL__GET_MPI_RANK_OPCODE, flags, NULL, &rank_ptr) < 0)
+ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_RANK_OPCODE, flags, NULL, &rank_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed")
HDassert(rank >= 0);
@@ -109,7 +109,7 @@ int
H5FD_mpi_get_size(H5FD_t *file)
{
const H5FD_class_t *cls;
- uint64_t flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
int size = 0;
void * size_ptr = (void *)(&size);
int ret_value;
@@ -122,7 +122,7 @@ H5FD_mpi_get_size(H5FD_t *file)
HDassert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((cls->ctl)(file, H5FD_CTL__GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0)
+ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request failed")
if (0 >= size)
@@ -162,7 +162,7 @@ MPI_Comm
H5FD_mpi_get_comm(H5FD_t *file)
{
const H5FD_class_t *cls;
- uint64_t flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
MPI_Comm comm = MPI_COMM_NULL;
void * comm_ptr = (void *)(&comm);
MPI_Comm ret_value;
@@ -175,7 +175,7 @@ H5FD_mpi_get_comm(H5FD_t *file)
HDassert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((cls->ctl)(file, H5FD_CTL__GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0)
+ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed")
if (comm == MPI_COMM_NULL)