diff options
author | David Young <dyoung@hdfgroup.org> | 2020-09-28 19:42:18 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-09-28 19:42:18 (GMT) |
commit | 14851e3b82a9b116153f9505654faf2f60e1abe2 (patch) | |
tree | 4ab01f77f124bad03f76338e70b6e2b3f0fb01e5 /src/H5Dmpio.c | |
parent | 8ee8b7abb55bc8d901e31b3eef9ba35abb352814 (diff) | |
parent | c0fbc5c086566d5d3c1d1ef26baa81a53d59fc08 (diff) | |
download | hdf5-14851e3b82a9b116153f9505654faf2f60e1abe2.zip hdf5-14851e3b82a9b116153f9505654faf2f60e1abe2.tar.gz hdf5-14851e3b82a9b116153f9505654faf2f60e1abe2.tar.bz2 |
Merge pull request #2650 in HDFFV/hdf5 from ~DYOUNG/werror:rebased-fprintf-experiment to develop
* commit 'c0fbc5c086566d5d3c1d1ef26baa81a53d59fc08': (24 commits)
Use the right format string, "%zu", for size_t.
Repair more format strings.
Fix a bunch of format string errors reported by Larry.
Fix some HDfprintf compilation errors: use the right format strings ("zu", PRIuHSIZE), avoid casting some printf arguments, pass the right number of arguments.
Test the format string "ll" before "l", "L", and "q", like the ./configure script does. This ought to fix the compilation failure in test/dt_arith.c that Allen told me about:
Cast a non-void pointer to void pointer for "%p".
Use PRIu32 and "zu" formats. Delete some casts from `size_t`.
I'm taking a guess that this code intended to point the 2-digit wide hexadecimal octet values, not 2 character-wide pointers to the bytes. The %02p format, which is a GNU-ism, disagreed with GCC 8.3.0 and the option flags we use.
%08p is not portable, it's a GNU-ism. Use %8p, instead. Squashes a GCC error.
Add format string macros PRI[doxX]HID for hid_t and use PRIdHID.
Use HDva_copy() and introduce a bunch of compatbility format-string constants for uppercase hexadecimal strings, `PRIX...`. Should fix the VS2010 errors that Allen mentioned:
Always #define HDfprintf as fprintf in this header. I believe this will fix the Windows build error that Allen reported.
Provide an HDvasprintf implementation only if it isn't #defined. This should fix the mingw compilation issue that Allen reported.
Fix va_list usage in the vasprintf(3) implementation.
Promote format-string warnings to errors.
Use the portable `-eq` operator instead of the bash-ism `==`. Fixes the tests on NetBSD, where /bin/sh != bash.
Restore a literal percent sign ("%%") that I accidentally deleted.
Fix code that made GCC complain about a NULL or `unsigned char *` arguments for "%s".
Take pains to provide UINT64_MAX in all conditions.
Correct a couple of format strings.
...
Diffstat (limited to 'src/H5Dmpio.c')
-rw-r--r-- | src/H5Dmpio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index e56f341..e6274d5 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -1082,7 +1082,7 @@ if(H5DEBUG(D)) #ifdef H5D_DEBUG if(H5DEBUG(D)) - HDfprintf(H5DEBUG(D),"total_chunks = %Zu, num_chunk = %Zu\n", total_chunks, num_chunk); + HDfprintf(H5DEBUG(D),"total_chunks = %zu, num_chunk = %zu\n", total_chunks, num_chunk); #endif /* Set up MPI datatype for chunks selected */ @@ -1545,7 +1545,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty chunk_addr = (haddr_t *)H5MM_calloc(total_chunk * sizeof(haddr_t)); #ifdef H5D_DEBUG if(H5DEBUG(D)) - HDfprintf(H5DEBUG(D), "total_chunk %Zu\n", total_chunk); + HDfprintf(H5DEBUG(D), "total_chunk %zu\n", total_chunk); #endif /* Obtain IO option for each chunk */ @@ -1579,7 +1579,7 @@ if(H5DEBUG(D)) #ifdef H5D_DEBUG if(H5DEBUG(D)) - HDfprintf(H5DEBUG(D),"mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u); + HDfprintf(H5DEBUG(D),"mpi_rank = %d, chunk index = %zu\n", mpi_rank, u); #endif /* Get the chunk info for this chunk, if there are elements selected */ chunk_info = fm->select_chunk[u]; @@ -1599,7 +1599,7 @@ if(H5DEBUG(D)) if(chunk_io_option[u] == H5D_CHUNK_IO_MODE_COL) { #ifdef H5D_DEBUG if(H5DEBUG(D)) - HDfprintf(H5DEBUG(D),"inside collective chunk IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u); + HDfprintf(H5DEBUG(D),"inside collective chunk IO mpi_rank = %d, chunk index = %zu\n", mpi_rank, u); #endif /* Set the file & memory dataspaces */ @@ -1637,7 +1637,7 @@ if(H5DEBUG(D)) else { /* possible independent IO for this chunk */ #ifdef H5D_DEBUG if(H5DEBUG(D)) - HDfprintf(H5DEBUG(D),"inside independent IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u); + HDfprintf(H5DEBUG(D),"inside independent IO mpi_rank = %d, chunk index = %zu\n", mpi_rank, u); #endif HDassert(chunk_io_option[u] == 0); |