summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-09-28 19:42:18 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-09-28 19:42:18 (GMT)
commit14851e3b82a9b116153f9505654faf2f60e1abe2 (patch)
tree4ab01f77f124bad03f76338e70b6e2b3f0fb01e5
parent8ee8b7abb55bc8d901e31b3eef9ba35abb352814 (diff)
parentc0fbc5c086566d5d3c1d1ef26baa81a53d59fc08 (diff)
downloadhdf5-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. ...
-rw-r--r--config/cmake_ext_mod/HDFTests.c2
-rw-r--r--config/gnu-warnings/error-general2
-rw-r--r--configure.ac2
-rw-r--r--hl/tools/h5watch/h5watch.c4
-rw-r--r--src/H5Abtree2.c8
-rw-r--r--src/H5B2dbg.c8
-rw-r--r--src/H5B2test.c4
-rw-r--r--src/H5Bdbg.c10
-rw-r--r--src/H5C.c10
-rw-r--r--src/H5Cdbg.c15
-rw-r--r--src/H5Cmpio.c9
-rw-r--r--src/H5Dbtree.c4
-rw-r--r--src/H5Dbtree2.c10
-rw-r--r--src/H5Dchunk.c4
-rw-r--r--src/H5Ddbg.c2
-rw-r--r--src/H5Dearray.c10
-rw-r--r--src/H5Dfarray.c10
-rw-r--r--src/H5Dmpio.c10
-rw-r--r--src/H5Dnone.c2
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5E.c31
-rw-r--r--src/H5EAdbg.c36
-rw-r--r--src/H5Eint.c31
-rw-r--r--src/H5FAdbg.c24
-rw-r--r--src/H5FDlog.c34
-rw-r--r--src/H5FDs3comms.c4
-rw-r--r--src/H5FSdbg.c16
-rw-r--r--src/H5Fdbg.c10
-rw-r--r--src/H5Gent.c6
-rw-r--r--src/H5HFbtree2.c8
-rw-r--r--src/H5HFdbg.c78
-rw-r--r--src/H5HFdblock.c2
-rw-r--r--src/H5HLdbg.c10
-rw-r--r--src/H5I.c4
-rw-r--r--src/H5Ipublic.h6
-rw-r--r--src/H5MFdbg.c14
-rw-r--r--src/H5Oainfo.c16
-rw-r--r--src/H5Oattr.c6
-rw-r--r--src/H5Ocache_image.c4
-rw-r--r--src/H5Ocont.c2
-rw-r--r--src/H5Odbg.c20
-rw-r--r--src/H5Odrvinfo.c2
-rw-r--r--src/H5Oefl.c18
-rw-r--r--src/H5Ofill.c2
-rw-r--r--src/H5Ofsinfo.c17
-rw-r--r--src/H5Oint.c6
-rw-r--r--src/H5Olayout.c14
-rw-r--r--src/H5Olinfo.c18
-rw-r--r--src/H5Olink.c9
-rw-r--r--src/H5Opline.c6
-rw-r--r--src/H5Osdspace.c4
-rw-r--r--src/H5Oshared.c2
-rw-r--r--src/H5Oshmesg.c2
-rw-r--r--src/H5Ostab.c4
-rw-r--r--src/H5SM.c22
-rw-r--r--src/H5SMbtree2.c6
-rw-r--r--src/H5Smpio.c18
-rw-r--r--src/H5Tconv.c8
-rw-r--r--src/H5Tdbg.c50
-rw-r--r--src/H5Z.c41
-rw-r--r--src/H5dbg.c2
-rw-r--r--src/H5private.h14
-rw-r--r--src/H5public.h135
-rw-r--r--src/H5system.c421
-rw-r--r--src/H5trace.c26
-rw-r--r--src/H5win32defs.h7
-rw-r--r--test/accum.c13
-rw-r--r--test/big.c6
-rw-r--r--test/cache_common.c16
-rw-r--r--test/chunk_info.c2
-rw-r--r--test/dsets.c4
-rw-r--r--test/earray.c18
-rw-r--r--test/farray.c6
-rw-r--r--test/fheap.c16
-rw-r--r--test/fillval.c12
-rw-r--r--test/filter_plugin.c2
-rw-r--r--test/freespace.c8
-rw-r--r--test/h5test.c4
-rw-r--r--test/hdfs.c5
-rw-r--r--test/hyperslab.c2
-rw-r--r--test/mf.c8
-rw-r--r--test/mirror_vfd.c6
-rw-r--r--test/ros3.c39
-rw-r--r--test/s3comms.c36
-rw-r--r--testpar/t_2Gio.c7
-rw-r--r--testpar/t_bigio.c35
-rw-r--r--testpar/t_cache.c66
-rw-r--r--testpar/t_cache_image.c12
-rw-r--r--testpar/t_filters_parallel.c52
-rw-r--r--testpar/t_shapesame.c6
-rw-r--r--tools/lib/h5diff_util.c4
-rw-r--r--tools/lib/h5tools_dump.c4
-rw-r--r--tools/src/h5dump/h5dump_ddl.c6
-rw-r--r--tools/src/h5dump/h5dump_xml.c2
-rw-r--r--tools/src/h5ls/h5ls.c6
-rw-r--r--tools/src/h5repack/h5repack.c2
-rw-r--r--tools/src/h5stat/h5stat.c72
-rw-r--r--tools/src/misc/h5clear.c2
-rw-r--r--tools/src/misc/h5debug.c2
-rw-r--r--tools/test/h5repack/h5repack.sh.in2
-rw-r--r--tools/test/perform/chunk_cache.c8
-rw-r--r--tools/test/perform/perf.c4
-rw-r--r--tools/test/perform/sio_engine.c2
-rw-r--r--tools/test/perform/sio_perf.c4
-rw-r--r--tools/test/perform/sio_standalone.h2
105 files changed, 758 insertions, 1089 deletions
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 31a568a..bed9444 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -178,7 +178,7 @@ int DebugReport(int reportType, char* message, int* returnValue)
int main(void)
{
- char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL };
+ char *llwidthArgs[] = { "I64", "l64", "ll", "l", "L", "q", NULL };
char *s = malloc(128);
char **currentArg = NULL;
LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general
index f0e61f8..4358b20 100644
--- a/config/gnu-warnings/error-general
+++ b/config/gnu-warnings/error-general
@@ -59,7 +59,7 @@
# jni/h5util.c
# -Werror=format(-overflow)
#
--Wformat
+-Werror=format
#
#
#Examples and tests do not use the same set of extensive warning flags as libraries
diff --git a/configure.ac b/configure.ac
index 75b94f0..e7a65ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2037,7 +2037,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
AC_MSG_CHECKING([how to print long long])
AC_CACHE_VAL([hdf5_cv_printf_ll], [
-for hdf5_cv_printf_ll in l ll L q unknown; do
+for hdf5_cv_printf_ll in ll l L q unknown; do
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([
#include <stdio.h>
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index a05c63b..56f9b63 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -206,7 +206,7 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
info.dset_format = "DSET-%s ";
info.dset_hidefileno = 0;
- info.obj_format = "-%lu:"H5_PRINTF_HADDR_FMT;
+ info.obj_format = "-%lu:%" PRIuHADDR;
info.obj_hidefileno = 0;
info.dset_blockformat_pre = "%sBlk%lu: ";
@@ -364,7 +364,7 @@ monitor_dataset(hid_t fid, char *dsetname)
if(i != ndims) {
/* Printing changes in dimension sizes */
for(u = 0; u < ndims; u++) {
- HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]);
+ HDfprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u], cur_dims[u]);
if(cur_dims[u] > prev_dims[u])
HDfprintf(stdout, " (increases)\n");
else if(cur_dims[u] < prev_dims[u])
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 843799e..0b38a4c 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -380,9 +380,9 @@ H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u, %08lx}\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth,
"Record:",
- (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder, (unsigned long)nrecord->hash);
+ nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_name_debug() */
@@ -537,9 +537,9 @@ H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth,
"Record:",
- (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder);
+ nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_corder_debug() */
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 0d93ed6..1917987 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -133,13 +133,13 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Depth:",
hdr->depth);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of records in tree:",
hdr->root.all_nrec);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Number of records in root node:",
hdr->root.node_nrec);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of root node:",
hdr->root.addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
@@ -245,7 +245,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
for(u = 0; u < internal->nrec; u++) {
/* Print node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str,
internal->node_ptrs[u].all_nrec,
internal->node_ptrs[u].node_nrec,
@@ -261,7 +261,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Print final node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str,
internal->node_ptrs[u].all_nrec,
internal->node_ptrs[u].node_nrec,
diff --git a/src/H5B2test.c b/src/H5B2test.c
index ee37c54..faa81f0 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -323,7 +323,7 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record,
HDassert(record);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Record:",
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:",
*(const hsize_t *)record);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -460,7 +460,7 @@ H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record,
HDassert(record);
- HDfprintf(stream, "%*s%-*s (%Hu, %Hu)\n", indent, "", fwidth, "Record:",
+ HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth, "Record:",
((const H5B2_test_rec_t *)record)->key,
((const H5B2_test_rec_t *)record)->val);
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index d900852..0d0a56d 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -98,10 +98,10 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
"Tree type ID:",
((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" :
((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Size of node:",
shared->sizeof_rnode);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Size of raw (disk) key:",
shared->sizeof_rkey);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
@@ -110,10 +110,10 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Level:",
bt->level);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of left sibling:",
bt->left);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of right sibling:",
bt->right);
HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth,
@@ -125,7 +125,7 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
*/
for(u = 0; u < bt->nchildren; u++) {
HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
"Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
diff --git a/src/H5C.c b/src/H5C.c
index fce8b26..0b4b231 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -638,7 +638,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%scache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%scache size increased from (%zu/%zu) to (%zu/%zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -650,13 +650,13 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
HDassert( old_max_cache_size < new_max_cache_size );
HDfprintf(stdout,
- "%sflash cache resize(%d) -- size threshold = %Zu.\n",
+ "%sflash cache resize(%d) -- size threshold = %zu.\n",
cache_ptr->prefix,
(int)((cache_ptr->resize_ctl).flash_incr_mode),
cache_ptr->flash_size_increase_threshold);
HDfprintf(stdout,
- "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -712,7 +712,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
}
HDfprintf(stdout,
- "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -997,7 +997,7 @@ H5C_dest(H5F_t * f)
if ( cache_ptr->get_entry_ptr_from_addr_counter > 0 ) {
HDfprintf(stdout,
- "*** %ld calls to H5C_get_entry_ptr_from_add(). ***\n",
+ "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n",
cache_ptr->get_entry_ptr_from_addr_counter);
}
#endif /* H5C_DO_SANITY_CHECKS */
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 47370f8..dae735d 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -291,13 +291,12 @@ H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(calling_fcn != NULL);
- HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n",
+ HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n",
calling_fcn);
- HDfprintf(stdout, " slist enabled = %d.\n",
- (int)(cache_ptr->slist_enabled));
- HDfprintf(stdout, " slist len = %u.\n", cache_ptr->slist_len);
- HDfprintf(stdout, " slist size = %lld.\n",
- (long long)(cache_ptr->slist_size));
+ HDfprintf(stdout, " slist %s.\n",
+ cache_ptr->slist_enabled ? "enabled" : "disabled");
+ HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len);
+ HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size);
if(cache_ptr->slist_len > 0) {
@@ -335,7 +334,7 @@ H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn)
entry_ptr->type->name);
HDfprintf(stdout, " node_ptr = %p, item = %p\n",
- node_ptr, H5SL_item(node_ptr));
+ (void *)node_ptr, H5SL_item(node_ptr));
/* increment node_ptr before we delete its target */
@@ -728,7 +727,7 @@ H5C_stats(H5C_t * cache_ptr,
(long long)(cache_ptr->index_scan_restarts));
HDfprintf(stdout,
- "%s cache image creations/reads/loads/size = %d / %d /%d / %Hu\n",
+ "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n",
cache_ptr->prefix,
cache_ptr->images_created,
cache_ptr->images_read,
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index a4c295b..9171cf7 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -786,17 +786,16 @@ H5C_mark_entries_as_clean(H5F_t * f,
if(entry_ptr == NULL) {
#if H5C_DO_SANITY_CHECKS
HDfprintf(stdout,
- "H5C_mark_entries_as_clean: entry[%u] = %a not in cache.\n",
- u,
- addr);
+ "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR
+ " not in cache.\n", u, addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?")
} /* end if */
else if(!entry_ptr->is_dirty) {
#if H5C_DO_SANITY_CHECKS
HDfprintf(stdout,
- "H5C_mark_entries_as_clean: entry %a is not dirty!?!\n",
- addr);
+ "H5C_mark_entries_as_clean: entry %" PRIuHADDR
+ " is not dirty!?!\n", addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?")
} /* end else-if */
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index 5b5ff4a..6da858f 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -773,7 +773,7 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for(u = 0; u < udata->ndims; u++)
- HDfprintf(stream, "%s%Hd", u?", ":"", (key->scaled[u] * udata->common.layout->dim[u]));
+ HDfprintf(stream, "%s%" PRIuHSIZE, u?", ":"", (key->scaled[u] * udata->common.layout->dim[u]));
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1420,7 +1420,7 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDassert(storage);
HDassert(stream);
- HDfprintf(stream, " Address: %a\n", storage->idx_addr);
+ HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_idx_dump() */
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index d233ce5..567db94 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -459,11 +459,11 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth,
HDassert(ctx->chunk_size == record->nbytes);
HDassert(0 == record->filter_mask);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for(u = 0; u < ctx->ndims; u++)
- HDfprintf(stream, "%s%Hd", u?", ":"", record->scaled[u] * ctx->dim[u]);
+ HDfprintf(stream, "%s%" PRIuHSIZE, u?", ":"", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -577,13 +577,13 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth,
HDassert(H5F_addr_defined(record->chunk_addr));
HDassert(0 != record->nbytes);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes);
HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for(u = 0; u < ctx->ndims; u++)
- HDfprintf(stream, "%s%Hd", u?", ":"", record->scaled[u] * ctx->dim[u]);
+ HDfprintf(stream, "%s%" PRIuHSIZE, u?", ":"", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1504,7 +1504,7 @@ H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDassert(storage);
HDassert(stream);
- HDfprintf(stream, " Address: %a\n", storage->idx_addr);
+ HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__bt2_idx_dump() */
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index b2a9eb6..557dd95 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -6574,9 +6574,9 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
} /* end if */
/* Print information about this chunk */
- HDfprintf(udata->stream, " 0x%08x %8Zu %10a [", chunk_rec->filter_mask, chunk_rec->nbytes, chunk_rec->chunk_addr);
+ HDfprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask, chunk_rec->nbytes, chunk_rec->chunk_addr);
for(u = 0; u < udata->ndims; u++)
- HDfprintf(udata->stream, "%s%Hu", (u ? ", " : ""), (chunk_rec->scaled[u] * udata->chunk_dim[u]));
+ HDfprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""), (chunk_rec->scaled[u] * udata->chunk_dim[u]));
HDfputs("]\n", udata->stream);
} /* end if */
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index d11a5d8..8725bd3 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -87,7 +87,7 @@ H5Ddebug(hid_t dset_id)
if(H5D_CHUNKED == dset->shared->layout.type)
(void)H5D__chunk_dump_index(dset, stdout);
else if(H5D_CONTIGUOUS == dset->shared->layout.type)
- HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr);
+ HDfprintf(stdout, " %-10s %" PRIuHADDR "\n", "Address:", dset->shared->layout.storage.u.contig.addr);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index a53489e..f1a6a5e 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -438,8 +438,8 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str,
+ HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str,
*(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -597,8 +597,8 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str,
+ HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx);
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str,
elmt->addr, elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1773,7 +1773,7 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDassert(storage);
HDassert(stream);
- HDfprintf(stream, " Address: %a\n", storage->idx_addr);
+ HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_dump() */
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index a9202c2..d83c191 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -434,8 +434,8 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str,
+ HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str,
*(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -699,8 +699,8 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str,
+ HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx);
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str,
elmt->addr, elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1624,7 +1624,7 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDassert(storage);
HDassert(stream);
- HDfprintf(stream, " Address: %a\n", storage->idx_addr);
+ HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_dump() */
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);
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 751d067..4622c84 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -489,7 +489,7 @@ H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDassert(storage);
HDassert(stream);
- HDfprintf(stream, " Address: %a\n", storage->idx_addr);
+ HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__none_idx_dump() */
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index cd71e93..5c505d6 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -546,7 +546,7 @@ H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDassert(storage);
HDassert(stream);
- HDfprintf(stream, " Address: %a\n", storage->idx_addr);
+ HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__single_idx_dump() */
diff --git a/src/H5E.c b/src/H5E.c
index a56181d..15cf5f4 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -1355,10 +1355,6 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
{
va_list ap; /* Varargs info */
H5E_t *estack; /* Pointer to error stack to modify */
-#ifndef H5_HAVE_VASPRINTF
- int tmp_len; /* Current size of description buffer */
- int desc_len; /* Actual length of description when formatted */
-#endif /* H5_HAVE_VASPRINTF */
char *tmp = NULL; /* Buffer to place formatted description in */
hbool_t va_started = FALSE; /* Whether the variable argument list is open */
herr_t ret_value=SUCCEED; /* Return value */
@@ -1388,31 +1384,9 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
HDva_start(ap, fmt);
va_started = TRUE;
-#ifdef H5_HAVE_VASPRINTF
/* Use the vasprintf() routine, since it does what we're trying to do below */
if(HDvasprintf(&tmp, fmt, ap) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-#else /* H5_HAVE_VASPRINTF */
- /* Allocate space for the formatted description buffer */
- tmp_len = 128;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-
- /* If the description doesn't fit into the initial buffer size, allocate more space and try again */
- while((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) {
- /* shutdown & restart the va_list */
- HDva_end(ap);
- HDva_start(ap, fmt);
-
- /* Release the previous description, it's too small */
- H5MM_xfree(tmp);
-
- /* Allocate a description of the appropriate length */
- tmp_len = desc_len + 1;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- } /* end while */
-#endif /* H5_HAVE_VASPRINTF */
/* Push the error on the stack */
if(H5E__push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
@@ -1421,16 +1395,11 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
done:
if(va_started)
HDva_end(ap);
-#ifdef H5_HAVE_VASPRINTF
/* Memory was allocated with HDvasprintf so it needs to be freed
* with HDfree
*/
if(tmp)
HDfree(tmp);
-#else /* H5_HAVE_VASPRINTF */
- if(tmp)
- H5MM_xfree(tmp);
-#endif /* H5_HAVE_VASPRINTF */
FUNC_LEAVE_API(ret_value)
} /* end H5Epush2() */
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index e5b68be..2686579 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -124,13 +124,13 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Header size:",
hdr->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Raw Element Size:",
(unsigned)hdr->cparam.raw_elmt_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Native Element Size (on this platform):",
hdr->cparam.cls->nat_elmt_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
@@ -148,19 +148,19 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Log2(Max. # of elements in data block page):",
(unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Highest element index stored (+1):",
hdr->stats.stored.max_idx_set);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of super blocks created:",
hdr->stats.stored.nsuper_blks);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of data blocks created:",
hdr->stats.stored.ndata_blks);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of elements 'realized':",
hdr->stats.stored.nelmts);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Index Block Address:",
hdr->idx_blk_addr);
@@ -228,13 +228,13 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Index Block size:",
iblock->size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"# of data block addresses in index block:",
iblock->ndblk_addrs);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"# of super block addresses in index block:",
iblock->nsblk_addrs);
@@ -263,7 +263,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
for(u = 0; u < iblock->ndblk_addrs; u++) {
/* Print address */
HDsprintf(temp_str, "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
iblock->dblk_addrs[u]);
} /* end for */
@@ -279,7 +279,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
for(u = 0; u < iblock->nsblk_addrs; u++) {
/* Print address */
HDsprintf(temp_str, "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
iblock->sblk_addrs[u]);
} /* end for */
@@ -349,13 +349,13 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Super Block size:",
sblock->size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"# of data block addresses in super block:",
sblock->ndblks);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"# of elements in data blocks from this super block:",
sblock->dblk_nelmts);
@@ -369,7 +369,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
for(u = 0; u < sblock->ndblks; u++) {
/* Print address */
HDsprintf(temp_str, "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
sblock->dblk_addrs[u]);
} /* end for */
@@ -433,7 +433,7 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Protect data block */
/* (Note: setting parent of data block to 'hdr' for this operation should be OK -QAK) */
if(NULL == (dblock = H5EA__dblock_protect(hdr, hdr, addr, dblk_nelmts, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %llu", (unsigned long long)addr)
+ H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %" PRIuHADDR, addr)
/* Print opening message */
HDfprintf(stream, "%*sExtensible Array data Block...\n", indent, "");
@@ -441,7 +441,7 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Data Block size:",
dblock->size);
diff --git a/src/H5Eint.c b/src/H5Eint.c
index cf1d649..e193c78 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -671,10 +671,6 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...)
{
va_list ap; /* Varargs info */
-#ifndef H5_HAVE_VASPRINTF
- int tmp_len; /* Current size of description buffer */
- int desc_len; /* Actual length of description when formatted */
-#endif /* H5_HAVE_VASPRINTF */
char *tmp = NULL; /* Buffer to place formatted description in */
hbool_t va_started = FALSE; /* Whether the variable argument list is open */
herr_t ret_value = SUCCEED; /* Return value */
@@ -703,31 +699,9 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
HDva_start(ap, fmt);
va_started = TRUE;
-#ifdef H5_HAVE_VASPRINTF
/* Use the vasprintf() routine, since it does what we're trying to do below */
if(HDvasprintf(&tmp, fmt, ap) < 0)
HGOTO_DONE(FAIL)
-#else /* H5_HAVE_VASPRINTF */
- /* Allocate space for the formatted description buffer */
- tmp_len = 128;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
- HGOTO_DONE(FAIL)
-
- /* If the description doesn't fit into the initial buffer size, allocate more space and try again */
- while((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) {
- /* shutdown & restart the va_list */
- HDva_end(ap);
- HDva_start(ap, fmt);
-
- /* Release the previous description, it's too small */
- H5MM_xfree(tmp);
-
- /* Allocate a description of the appropriate length */
- tmp_len = desc_len + 1;
- if(NULL == (tmp = H5MM_malloc((size_t)tmp_len)))
- HGOTO_DONE(FAIL)
- } /* end while */
-#endif /* H5_HAVE_VASPRINTF */
/* Push the error on the stack */
if(H5E__push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
@@ -736,16 +710,11 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
done:
if(va_started)
HDva_end(ap);
-#ifdef H5_HAVE_VASPRINTF
/* Memory was allocated with HDvasprintf so it needs to be freed
* with HDfree
*/
if(tmp)
HDfree(tmp);
-#else /* H5_HAVE_VASPRINTF */
- if(tmp)
- H5MM_xfree(tmp);
-#endif /* H5_HAVE_VASPRINTF */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */
diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c
index b578cf2..af4616c 100644
--- a/src/H5FAdbg.c
+++ b/src/H5FAdbg.c
@@ -123,13 +123,13 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Header size:",
hdr->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Raw Element Size:",
(unsigned)hdr->cparam.raw_elmt_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Native Element Size (on this platform):",
hdr->cparam.cls->nat_elmt_size);
@@ -138,10 +138,10 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
"Max. # of elements in data block page:",
(unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of elements in Fixed Array:", hdr->stats.nelmts);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Fixed Array Data Block Address:", hdr->dblk_addr);
CATCH
@@ -207,13 +207,13 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data Block size:", dblock->size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size);
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of elements in Data Block:", hdr->cparam.nelmts);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Number of pages in Data Block:", dblock->npages);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Number of elements per Data Block page:", dblock->dblk_page_nelmts);
if(dblock->npages) { /* paging */
@@ -230,8 +230,8 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Read and print each page's elements in the data block */
for(page_idx = 0; page_idx < dblock->npages; page_idx++) {
if(!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
- HDfprintf(stream, "%*s%-*s %Hu %s\n", indent, "", fwidth,
- "Page %Zu:", page_idx, "empty");
+ HDfprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth,
+ "Page %zu:", page_idx, "empty");
} /* end if */
else { /* get the page */
@@ -245,7 +245,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dblk_page_addr, dblk_page_nelmts, H5AC__READ_ONLY_FLAG)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr)
- HDfprintf(stream, "%*sElements in page %Zu:\n", indent, "", page_idx);
+ HDfprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx);
for(u = 0; u < dblk_page_nelmts; u++) {
/* Call the class's 'debug' callback */
if((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0)
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 5d1b536..2faeab1 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -756,13 +756,13 @@ H5FD__log_close(H5FD_t *_file)
addr = 1;
while(addr < file->eoa) {
if(file->nwrite[addr] != last_val) {
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
last_val = file->nwrite[addr];
last_addr = addr;
} /* end if */
addr++;
} /* end while */
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
} /* end if */
/* Dump the read I/O information */
@@ -773,13 +773,13 @@ H5FD__log_close(H5FD_t *_file)
addr = 1;
while(addr < file->eoa) {
if(file->nread[addr] != last_val) {
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
last_val = file->nread[addr];
last_addr = addr;
} /* end if */
addr++;
} /* end while */
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
} /* end if */
/* Dump the I/O flavor information */
@@ -790,13 +790,13 @@ H5FD__log_close(H5FD_t *_file)
addr = 1;
while(addr < file->eoa) {
if(file->flavor[addr] != last_val) {
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
last_val = file->flavor[addr];
last_addr = addr;
} /* end if */
addr++;
} /* end while */
- HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
} /* end if */
/* Free the logging information */
@@ -954,7 +954,7 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs
} /* end if */
if(file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", addr, (addr + size) - 1, size, flavors[type]);
+ HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr, (addr + size) - 1, size, flavors[type]);
} /* end if */
/* Set return value */
@@ -994,7 +994,7 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
/* Log the file memory freed */
if(file->fa.flags & H5FD_LOG_FREE)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Freed\n", addr, (addr + size) - 1, size, flavors[type]);
+ HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", addr, (addr + size) - 1, size, flavors[type]);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1062,7 +1062,7 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/* Log the extension like an allocation */
if(file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size, flavors[type]);
+ HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", file->eoa, addr, size, flavors[type]);
} /* end if */
/* Check for decreasing file size */
@@ -1078,7 +1078,7 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/* Log the shrink like a free */
if(file->fa.flags & H5FD_LOG_FREE)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Freed\n", file->eoa, addr, size, flavors[type]);
+ HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", file->eoa, addr, size, flavors[type]);
} /* end if */
} /* end if */
@@ -1230,7 +1230,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Emit log string if we're tracking individual seek events. */
if(file->fa.flags & H5FD_LOG_LOC_SEEK) {
- HDfprintf(file->logfp, "Seek: From %10a To %10a", file->pos, addr);
+ HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
/* Add the seek time, if we're tracking that.
* Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK
@@ -1283,7 +1283,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
if(file->fa.flags & H5FD_LOG_LOC_READ)
- HDfprintf(file->logfp, "Error! Reading: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
+ HDfprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)offset);
} /* end if */
@@ -1319,7 +1319,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Log information about the read */
if(file->fa.flags & H5FD_LOG_LOC_READ) {
- HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Read", orig_addr, (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr, (orig_addr + orig_size) - 1, orig_size, flavors[type]);
/* Verify that we are reading in the type of data we allocated in this location */
if(file->flavor) {
@@ -1439,7 +1439,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
/* Emit log string if we're tracking individual seek events. */
if(file->fa.flags & H5FD_LOG_LOC_SEEK) {
- HDfprintf(file->logfp, "Seek: From %10a To %10a", file->pos, addr);
+ HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
/* Add the seek time, if we're tracking that.
* Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK
@@ -1492,7 +1492,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
if(file->fa.flags & H5FD_LOG_LOC_WRITE)
- HDfprintf(file->logfp, "Error! Writing: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
+ HDfprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
@@ -1521,7 +1521,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
/* Log information about the write */
if(file->fa.flags & H5FD_LOG_LOC_WRITE) {
- HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Written", orig_addr, (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr, (orig_addr + orig_size) - 1, orig_size, flavors[type]);
/* Check if this is the first write into a "default" section, grabbed by the metadata agregation algorithm */
if(file->fa.flags & H5FD_LOG_FLAVOR) {
@@ -1641,7 +1641,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
/* Emit log string if we're tracking individual truncate events. */
if(file->fa.flags & H5FD_LOG_TRUNCATE) {
- HDfprintf(file->logfp, "Truncate: To %10a", file->eoa);
+ HDfprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa);
/* Add the truncate time, if we're tracking that.
* Note that the truncate time is NOT emitted for when just H5FD_LOG_TIME_TRUNCATE
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index 4c762d1..db795b1 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -1291,7 +1291,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
if(rangebytesstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE),
- "bytes="H5_PRINTF_HADDR_FMT"-"H5_PRINTF_HADDR_FMT,
+ "bytes=%" PRIuHADDR "-%" PRIuHADDR,
offset, offset + len - 1);
if(ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
@@ -1300,7 +1300,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
if(rangebytesstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE),
- "bytes="H5_PRINTF_HADDR_FMT"-", offset);
+ "bytes=%" PRIuHADDR "-", offset);
if(ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
}
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index 9708e9e..fa536f9 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -129,16 +129,16 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
"Free space client:",
(fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" :
(fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Total free space tracked:",
fspace->tot_space);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Total number of free space sections tracked:",
fspace->tot_sect_count);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of serializable free space sections tracked:",
fspace->serial_sect_count);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of ghost free space sections tracked:",
fspace->ghost_sect_count);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
@@ -153,16 +153,16 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"# of bits for section address space:",
fspace->max_sect_addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Maximum section size:",
fspace->max_sect_size);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Serialized sections address:",
fspace->sect_addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Serialized sections size used:",
fspace->sect_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Serialized sections size allocated:",
fspace->alloc_sect_size);
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index 09f6829..ff08242 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -77,9 +77,9 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
"File access flags", f->shared->flags);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"File open reference count:", f->shared->nrefs);
- HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth,
"Address of super block:", f->shared->sblock->base_addr);
- HDfprintf(stream, "%*s%-*s %Hu bytes\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth,
"Size of userblock:", userblock_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
@@ -105,16 +105,16 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
"Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]);
HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
"File status flags:", (unsigned)(f->shared->sblock->status_flags));
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
"Superblock extension address:", f->shared->sblock->ext_addr);
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
"Shared object header message table address:", f->shared->sohm_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Shared object header message version number:", (unsigned) f->shared->sohm_vers);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Number of shared object header message indexes:", (unsigned) f->shared->sohm_nindexes);
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
"Address of driver information block:", f->shared->sblock->driver_addr);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 632ffa0..97a50a7 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -545,7 +545,7 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
"Name offset into private heap:",
(unsigned long) (ent->name_off));
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Object header address:", ent->header);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth,
@@ -560,10 +560,10 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
"Cached entry information:");
- HDfprintf(stream, "%*s%-*s %a\n", nested_indent, "", nested_fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
"B-tree address:", ent->cache.stab.btree_addr);
- HDfprintf(stream, "%*s%-*s %a\n", nested_indent, "", nested_fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
"Heap address:", ent->cache.stab.heap_addr);
break;
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index 756ddb5..3858464 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -454,7 +454,7 @@ H5HF__huge_bt2_indir_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -661,7 +661,7 @@ H5HF__huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -848,7 +848,7 @@ H5HF__huge_bt2_dir_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu}\n", indent, "", fwidth, "Record:",
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1064,7 +1064,7 @@ H5HF__huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu}\n", indent, "", fwidth, "Record:",
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index e841d78..4d2296e 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -161,7 +161,7 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length")
/* Display the heap ID */
- HDfprintf(stream, "%*s%-*s (%c, %Hu, %Zu)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE" , %zu)\n", indent, "", fwidth,
"Heap ID info: (type, offset, length)",
id_type, obj_off, obj_len);
@@ -202,10 +202,10 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Doubling table width:",
dtable->cparam.width);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Starting block size:",
dtable->cparam.start_block_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Max. direct block size:",
dtable->cparam.max_direct_size);
HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth,
@@ -216,7 +216,7 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw
dtable->cparam.start_root_rows);
/* Run-time varying parameter values */
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Table's root address:",
dtable->table_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
@@ -233,7 +233,7 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"# of bits for IDs in first row:",
dtable->first_row_bits);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"# of IDs in first row:",
dtable->num_id_first_row);
@@ -275,52 +275,52 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Heap is:",
hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Objects stored in 'debugging' format:",
- hdr->debug_objs);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
+ hdr->debug_objs ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"'Write once' flag:",
- hdr->write_once);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
+ hdr->write_once ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"'Huge' object IDs have wrapped:",
- hdr->huge_ids_wrapped);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ hdr->huge_ids_wrapped ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Free space in managed blocks:",
hdr->total_man_free);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Managed space data block size:",
hdr->man_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Total managed space allocated:",
hdr->man_alloc_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Offset of managed space iterator:",
hdr->man_iter_off);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Number of managed objects in heap:",
hdr->man_nobjs);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of free space manager for managed blocks:",
hdr->fs_addr);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Max. size of managed object:",
(unsigned long)hdr->max_man_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"'Huge' object space used:",
hdr->huge_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Number of 'huge' objects in heap:",
hdr->huge_nobjs);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"ID of next 'huge' object:",
hdr->huge_next_id);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of v2 B-tree for 'huge' objects:",
hdr->huge_bt2_addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"'Tiny' object space used:",
hdr->tiny_size);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Number of 'tiny' objects in heap:",
hdr->tiny_nobjs);
@@ -331,7 +331,7 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
if(hdr->filter_len > 0) {
HDfprintf(stream, "%*sI/O filter Info...\n", indent, "");
if(hdr->man_dtable.curr_root_rows == 0) {
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Compressed size of root direct block:",
hdr->pline_root_direct_size);
HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
@@ -351,7 +351,7 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
hdr->root_iblock_flags);
HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
"Root indirect block pointer:",
- hdr->root_iblock);
+ (void *)hdr->root_iblock);
if(hdr->root_iblock)
H5HF_iblock_print(hdr->root_iblock, dump_internal, stream, indent + 3, fwidth);
} /* end if */
@@ -463,7 +463,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
len = end - start;
HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
- HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
+ HDfprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
temp_str,
start, len);
udata->sect_count++;
@@ -539,14 +539,14 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of fractal heap that owns this block:",
hdr->heap_addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Offset of direct block in heap:",
dblock->block_off);
blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Size of block header:",
blk_prefix_size);
@@ -653,13 +653,13 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of fractal heap that owns this block:",
hdr->heap_addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE" \n", indent, "", fwidth,
"Offset of indirect block in heap:",
iblock->block_off);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Size of indirect block:",
iblock->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
@@ -686,13 +686,13 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
if(hdr->filter_len > 0)
- HDfprintf(stream, "%*s%-*s %9a/%6Zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
+ HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
temp_str,
iblock->ents[off].addr,
iblock->filt_ents[off].size,
iblock->filt_ents[off].filter_mask);
else
- HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6),
+ HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6),
temp_str,
iblock->ents[off].addr);
} /* end for */
@@ -713,7 +713,7 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
- HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6),
+ HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6),
temp_str,
iblock->ents[off].addr);
} /* end for */
@@ -728,14 +728,14 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
HDfprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, "");
/* Print general information */
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Reference count:",
iblock->rc);
/* Print parent's information */
HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
"Parent indirect block address:",
- iblock->parent);
+ (void *)iblock->parent);
if(iblock->parent)
H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth);
} /* end if */
@@ -834,10 +834,10 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE ? "single" :
(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ? "first row" :
(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
- HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
+ HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
"Section address:",
sect->sect_info.addr);
- HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
+ HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
"Section size:",
sect->sect_info.size);
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index 1e0813c..022f5fb 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -402,7 +402,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request,
/* Check for skipping over blocks */
if(min_dblock_size > next_size) {
-HDfprintf(stderr, "%s: Skipping direct block sizes not supported, min_dblock_size = %Zu, next_size = %Zu\n", FUNC, min_dblock_size, next_size);
+HDfprintf(stderr, "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n", FUNC, min_dblock_size, next_size);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet")
} /* end if */
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index c0ec68b..636ea9d 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -66,13 +66,13 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent, int fwidth))
H5E_THROW(H5E_CANTPROTECT, "unable to load/protect local heap");
HDfprintf(stream, "%*sLocal Heap...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Header size (in bytes):",
- (unsigned long)h->prfx_size);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ h->prfx_size);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Address of heap data:",
h->dblk_addr);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Data bytes allocated for heap:",
h->dblk_size);
@@ -88,7 +88,7 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent, int fwidth))
char temp_str[32];
HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
- HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9), temp_str, freelist->offset, freelist->size);
+ HDfprintf(stream, "%*s%-*s %8zu, %8zu\n", indent+3, "", MAX(0,fwidth-9), temp_str, freelist->offset, freelist->size);
if((freelist->offset + freelist->size) > h->dblk_size)
HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
else {
diff --git a/src/H5I.c b/src/H5I.c
index c1d966c..0834c2b 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2412,9 +2412,9 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
+ HDfprintf(stderr, " id = %" PRIdHID "\n", item->id);
HDfprintf(stderr, " count = %u\n", item->count);
- HDfprintf(stderr, " obj = 0x%08p\n", item->obj_ptr);
+ HDfprintf(stderr, " obj = 0x%8p\n", item->obj_ptr);
/* Get the group location, so we get get the name */
switch (type) {
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index 34a408f..c0334b0 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -53,6 +53,12 @@ typedef enum H5I_type_t {
/* Type of atoms to return to users */
typedef int64_t hid_t;
+
+#define PRIdHID PRId64
+#define PRIxHID PRIx64
+#define PRIXHID PRIX64
+#define PRIoHID PRIo64
+
#define H5_SIZEOF_HID_T H5_SIZEOF_INT64_T
/* An invalid object ID. This is also negative for error return. */
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index abdecce..98b9483 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -117,13 +117,13 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
(sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE ? "simple" :
(sect->sect_info.type == H5MF_FSPACE_SECT_SMALL ? "small" :
(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown"))));
- HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
+ HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
"Section address:",
sect->sect_info.addr);
- HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
+ HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
"Section size:",
sect->sect_info.size);
- HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
+ HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
"End of section:",
(haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
@@ -234,7 +234,7 @@ HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
+HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", FUNC, eoa);
#endif /* H5MF_ALLOC_DEBUG */
if(H5F_PAGED_AGGR(f)) { /* File space paging */
@@ -276,13 +276,13 @@ HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
/* Retrieve metadata aggregator info, if available */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: ma_addr = %a, ma_size = %Hu, end of ma = %a\n", FUNC, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
+HDfprintf(stderr, "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n", FUNC, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve 'small data' aggregator info, if available */
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size);
#ifdef H5MF_ALLOC_DEBUG
-HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
+HDfprintf(stderr, "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n", FUNC, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Iterate over all the free space types that have managers and dump each free list's space */
@@ -295,7 +295,7 @@ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC,
/* Retrieve the 'eoa' for this file memory type */
if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, atype)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa);
/* Print header for sections */
HDfprintf(stream, "%*sSections:\n", indent + 3, "");
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index fb08048..80be046 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -514,19 +514,19 @@ H5O__ainfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of attributes:", ainfo->nattrs);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Track creation order of attributes:", ainfo->track_corder);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Index creation order of attributes:", ainfo->index_corder);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE");
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Max. creation index value:", (unsigned)ainfo->max_crt_idx);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 8b02724..880a909 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -855,10 +855,10 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE * stream, int indent, int fwid
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Character Set of Name:",
s);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Object opened:",
- mesg->obj_opened);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ mesg->obj_opened ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Object:",
mesg->oloc.addr);
diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c
index ac51aff..f1882ee 100644
--- a/src/H5Ocache_image.c
+++ b/src/H5Ocache_image.c
@@ -342,10 +342,10 @@ H5O__mdci_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Metadata Cache Image Block address:", mdci->addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Metadata Cache Image Block size in bytes:", mdci->size);
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index 68a88e2..850fa5c 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -269,7 +269,7 @@ H5O__cont_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Continuation address:", cont->addr);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index b476b17..ade85d1 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -300,9 +300,9 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
/* debug */
HDfprintf(stream, "%*sObject Header...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Dirty:",
- oh->cache_info.is_dirty);
+ oh->cache_info.is_dirty ? "TRUE" : "FALSE");
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Version:",
oh->version);
@@ -367,10 +367,10 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
} /* end if */
} /* end if */
- HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth,
"Number of messages (allocated):",
oh->nmesgs, oh->alloc_nmesgs);
- HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth,
"Number of chunks (allocated):",
oh->nchunks, oh->alloc_nchunks);
@@ -380,7 +380,7 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
HDfprintf(stream, "%*sChunk %d...\n", indent, "", i);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
"Address:",
oh->chunk[i].addr);
@@ -397,11 +397,11 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
chunk_total += chunk_size;
gap_total += oh->chunk[i].gap;
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Size in bytes:",
chunk_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Gap:",
oh->chunk[i].gap);
} /* end for */
@@ -435,9 +435,9 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
(unsigned) (oh->mesg[i].type->id),
oh->mesg[i].type->name,
sequence[oh->mesg[i].type->id]++);
- HDfprintf(stream, "%*s%-*s %t\n", indent + 3, "", MAX (0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX (0, fwidth - 3),
"Dirty:",
- oh->mesg[i].dirty);
+ oh->mesg[i].dirty ? "TRUE" : "FALSE");
HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX (0, fwidth - 3),
"Message flags:");
if(oh->mesg[i].flags) {
@@ -496,7 +496,7 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
chunkno = oh->mesg[i].chunkno;
if(chunkno >= oh->nchunks)
HDfprintf(stream, "*** BAD CHUNK NUMBER\n");
- HDfprintf(stream, "%*s%-*s (%Zu, %Zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
"Raw message data (offset, size) in chunk:",
(size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image),
oh->mesg[i].raw_size);
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index dffacfd..7ef0e89 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -304,7 +304,7 @@ H5O__drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Driver name:", mesg->name);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Buffer size:", mesg->len);
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 83bab09..8c391a7 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -542,34 +542,34 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Heap address:", mesg->heap_addr);
- HDfprintf(stream, "%*s%-*s %u/%u\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth,
"Slots used/allocated:",
mesg->nused, mesg->nalloc);
for(u = 0; u < mesg->nused; u++) {
char buf[64];
- HDsnprintf(buf, sizeof(buf), "File %u", (unsigned)u);
+ HDsnprintf(buf, sizeof(buf), "File %zu", u);
HDfprintf(stream, "%*s%s:\n", indent, "", buf);
HDfprintf(stream, "%*s%-*s \"%s\"\n", indent+3, "", MAX (fwidth-3, 0),
"Name:",
mesg->slot[u].name);
- HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0),
+ HDfprintf(stream, "%*s%-*s %zu\n", indent+3, "", MAX (fwidth-3, 0),
"Name offset:",
- (unsigned long)(mesg->slot[u].name_offset));
+ mesg->slot[u].name_offset);
- HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0),
+ HDfprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent+3, "", MAX (fwidth-3, 0),
"Offset of data in file:",
- (unsigned long)(mesg->slot[u].offset));
+ (intmax_t)(mesg->slot[u].offset));
- HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0),
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent+3, "", MAX (fwidth-3, 0),
"Bytes reserved for data:",
- (unsigned long)(mesg->slot[u].size));
+ (mesg->slot[u].size));
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index b9422fb..652f72f 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -949,7 +949,7 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth,
"Size:", fill->size);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
if(fill->type) {
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index d0f447c..a6406d5 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -388,25 +388,26 @@ H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
HDfprintf(stream, "%s\n", "unknown");
} /* end switch */
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Free-space persist:", fsinfo->persist);
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Free-space section threshold:", fsinfo->threshold);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"File space page size:", fsinfo->page_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Page end metadata threshold:", fsinfo->pgend_meta_thres);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
- if(fsinfo->persist)
+ if(fsinfo->persist) {
for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Free space manager address:", fsinfo->fs_addr[ptype-1]);
+ } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fsinfo_debug() */
diff --git a/src/H5Oint.c b/src/H5Oint.c
index e41f0fe..18bb41c 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -587,7 +587,7 @@ H5O_open(H5O_loc_t *loc)
#ifdef H5O_DEBUG
if(H5DEBUG(O))
- HDfprintf(H5DEBUG(O), "> %a\n", loc->addr);
+ HDfprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr);
#endif
/* Turn off the variable for holding file or increment open-lock counters */
@@ -823,9 +823,9 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
#ifdef H5O_DEBUG
if(H5DEBUG(O)) {
if(FALSE == H5F_ID_EXISTS(loc->file) && 1 == H5F_NREFS(loc->file))
- HDfprintf(H5DEBUG(O), "< %a auto %lu remaining\n", loc->addr, (unsigned long)H5F_NOPEN_OBJS(loc->file));
+ HDfprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr, (unsigned long)H5F_NOPEN_OBJS(loc->file));
else
- HDfprintf(H5DEBUG(O), "< %a\n", loc->addr);
+ HDfprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr);
}
#endif
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 99e646d..232d8de 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -1172,35 +1172,35 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
"Index Type:", "Unknown", (unsigned)mesg->u.chunk.idx_type);
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Index address:", mesg->storage.u.chunk.idx_addr);
break;
case H5D_CONTIGUOUS:
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Type:", "Contiguous");
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Data address:", mesg->storage.u.contig.addr);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Data Size:", mesg->storage.u.contig.size);
break;
case H5D_COMPACT:
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Type:", "Compact");
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Data Size:", mesg->storage.u.compact.size);
break;
case H5D_VIRTUAL:
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Type:", "Virtual");
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx);
for(u = 0; u < mesg->storage.u.virt.list_nused; u++) {
- HDfprintf(stream, "%*sMapping %u:\n", indent, "", u);
+ HDfprintf(stream, "%*sMapping %zu:\n", indent, "", u);
HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
"Virtual selection:", "<Not yet implemented>");
HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index ebb34dc..5d3b77a 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -562,19 +562,19 @@ H5O__linfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Track creation order of links:", linfo->track_corder);
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Index creation order of links:", linfo->index_corder);
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE");
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
"Number of links:", linfo->nlinks);
- HDfprintf(stream, "%*s%-*s %Hd\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth,
"Max. creation order value:", linfo->max_corder);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"'Dense' link storage fractal heap address:", linfo->fheap_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 70b654f..0a0c818 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -834,7 +834,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
(lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
if(lnk->corder_valid)
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Creation Order:", lnk->corder);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
@@ -846,7 +846,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
/* Display link-specific information */
switch(lnk->type) {
case H5L_TYPE_HARD:
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Object address:", lnk->u.hard.addr);
break;
@@ -864,12 +864,13 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
const char *objname = (const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "External File Name:", lnk->u.ud.udata);
+ "External File Name:",
+ (const char *)lnk->u.ud.udata);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"External Object Name:", objname);
} /* end if */
else {
- HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
"User-Defined Link Size:", lnk->u.ud.size);
} /* end else */
} /* end if */
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 6ee0735..89893f6 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -655,7 +655,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %Zu/%Zu\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth,
"Number of filters:",
pline->nused,
pline->nalloc);
@@ -664,7 +664,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream,
for(i = 0; i < pline->nused; i++) {
char name[32];
- HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
+ HDsnprintf(name, sizeof(name), "Filter at position %zu", i);
HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter identification:",
@@ -679,7 +679,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream,
HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
"Flags:",
pline->filter[i].flags);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Num CD values:",
pline->filter[i].cd_nelmts);
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 54ac71f..da279ab 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -504,7 +504,7 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE * stream,
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
for(u = 0; u < sdim->rank; u++)
- HDfprintf (stream, "%s%Hu", u?", ":"", sdim->size[u]);
+ HDfprintf (stream, "%s%" PRIuHSIZE, u?", ":"", sdim->size[u]);
HDfprintf (stream, "}\n");
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:");
@@ -514,7 +514,7 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE * stream,
if(H5S_UNLIMITED==sdim->max[u])
HDfprintf (stream, "%sUNLIM", u?", ":"");
else
- HDfprintf (stream, "%s%Hu", u?", ":"", sdim->max[u]);
+ HDfprintf (stream, "%s%" PRIuHSIZE, u?", ":"", sdim->max[u]);
} /* end for */
HDfprintf (stream, "}\n");
} /* end if */
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index ca6c873..43d48d8 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -729,7 +729,7 @@ H5O__shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Shared Message type:",
"Obj Hdr");
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Object address:",
mesg->u.loc.oh_addr);
break;
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 10181ad..5983513 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -238,7 +238,7 @@ H5O__shmesg_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Version:", mesg->version);
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
"Shared message table address:", mesg->addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Number of indexes:", mesg->nindexes);
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 18f32b3..14c7470 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -429,10 +429,10 @@ H5O__stab_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"B-tree address:", stab->btree_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
"Name heap address:", stab->heap_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5SM.c b/src/H5SM.c
index 404e08b..abfebbd 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -2602,19 +2602,19 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent,
(table->indexes[x].index_type == H5SM_LIST ? "List" :
(table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
"Address of index:", table->indexes[x].index_addr);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
"Address of index's heap:", table->indexes[x].heap_addr);
HDfprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth,
"Message type flags:", table->indexes[x].mesg_types);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
"Minimum size of messages:", table->indexes[x].min_mesg_size);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
"Number of messages:", table->indexes[x].num_messages);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
"Maximum list size:", table->indexes[x].list_max);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
"Minimum B-tree size:", table->indexes[x].btree_min);
} /* end for */
@@ -2702,17 +2702,17 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent,
HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth,
"Location:", "in heap");
- HDfprintf(stream, "%*s%-*s 0x%Zx\n", indent + 3, "", fwidth,
- "Heap ID:", list->messages[x].u.heap_loc.fheap_id);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth,
+ "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val);
+ HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth,
"Reference count:", list->messages[x].u.heap_loc.ref_count);
} /* end if */
else if(list->messages[x].location == H5SM_IN_OH) {
HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth,
"Location:", "in object header");
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
"Object header address:", list->messages[x].u.mesg_loc.oh_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
"Message creation index:", list->messages[x].u.mesg_loc.oh_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
"Message type ID:", list->messages[x].msg_type_id);
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 644f3dc..55ca131 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -199,12 +199,12 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth,
FUNC_ENTER_STATIC_NOERR
if(sohm->location == H5SM_IN_HEAP)
- HDfprintf(stream, "%*s%-*s {%a, %lo, %Hx}\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth,
"Shared Message in heap:",
- sohm->u.heap_loc.fheap_id, sohm->hash, sohm->u.heap_loc.ref_count);
+ sohm->u.heap_loc.fheap_id.val, sohm->hash, sohm->u.heap_loc.ref_count);
else {
HDassert(sohm->location == H5SM_IN_OH);
- HDfprintf(stream, "%*s%-*s {%a, %lo, %Hx, %Hx}\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth,
"Shared Message in OH:",
sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id, sohm->u.mesg_loc.index);
} /* end else */
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 147fd25..2f8c43a 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -704,7 +704,7 @@ if(H5DEBUG(S))
#ifdef H5S_DEBUG
if(H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S), "%s: start=%Hd stride=%Hu count=%Hu block=%Hu xtent=%Hu",
+ HDfprintf(H5DEBUG(S), "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
FUNC, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if(u == 0)
HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
@@ -736,7 +736,7 @@ if(H5DEBUG(S))
#ifdef H5S_DEBUG
if(H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S), "%s: start=%Hd stride=%Hu count=%Hu block=%Hu xtent=%Hu",
+ HDfprintf(H5DEBUG(S), "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
FUNC, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if(u == 0)
HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
@@ -761,7 +761,7 @@ if(H5DEBUG(S)) {
#ifdef H5S_DEBUG
if(H5DEBUG(S)) {
i = ((int)rank) - 1;
- HDfprintf(H5DEBUG(S), " offset[%2d]=%Hu; max_xtent[%2d]=%Hu\n", i, offset[i], i, max_xtent[i]);
+ HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i, max_xtent[i]);
}
#endif
for(i = ((int)rank) - 2; i >= 0; --i) {
@@ -769,7 +769,7 @@ if(H5DEBUG(S)) {
max_xtent[i] = max_xtent[i + 1] * d[i].xtent;
#ifdef H5S_DEBUG
if(H5DEBUG(S))
- HDfprintf(H5DEBUG(S), " offset[%2d]=%Hu; max_xtent[%2d]=%Hu\n", i, offset[i], i, max_xtent[i]);
+ HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i, max_xtent[i]);
#endif
} /* end for */
@@ -784,9 +784,9 @@ if(H5DEBUG(S))
*******************************************************/
#ifdef H5S_DEBUG
if(H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S), "%s: Making contig type %Zu MPI_BYTEs\n", FUNC, elmt_size);
+ HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", FUNC, elmt_size);
for(i = ((int)rank) - 1; i >= 0; --i)
- HDfprintf(H5DEBUG(S), "d[%d].xtent=%Hu \n", i, d[i].xtent);
+ HDfprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
}
#endif
@@ -814,7 +814,9 @@ if(H5DEBUG(S)) {
#ifdef H5S_DEBUG
if(H5DEBUG(S))
HDfprintf(H5DEBUG(S), "%s: Dimension i=%d \n"
- "start=%Hd count=%Hu block=%Hu stride=%Hu, xtent=%Hu max_xtent=%d\n",
+ "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE
+ " stride=%" PRIuHSIZE ", xtent=%" PRIuHSIZE
+ " max_xtent=%" PRIuHSIZE "\n",
FUNC, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
#endif
@@ -955,7 +957,7 @@ done:
#ifdef H5S_DEBUG
if(H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "Leave %s, count=%ld is_derived_type=%t\n", FUNC, *count, *is_derived_type);
+ HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", FUNC, *count, (*is_derived_type) ? "TRUE" : "FALSE");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__mpio_reg_hyper_type() */
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 6dae0b4..2f6efa0 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -911,15 +911,15 @@ done: \
# define CI_PRINT_STATS(STYPE,DTYPE) { \
if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
HDfprintf(H5DEBUG(T), \
- " %Hu src elements aligned on %lu-byte boundaries\n", \
+ " %zu src elements aligned on %zu-byte boundaries\n", \
((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
- (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
+ H5T_NATIVE_##STYPE##_ALIGN_g); \
} \
if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
HDfprintf(H5DEBUG(T), \
- " %Hu dst elements aligned on %lu-byte boundaries\n", \
+ " %zu dst elements aligned on %zu-byte boundaries\n", \
((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
- (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ H5T_NATIVE_##DTYPE##_ALIGN_g); \
} \
}
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index 6188138..a230753 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -101,16 +101,25 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED * path, int H5_ATTR_UNUSED * nprint/*
if(H5DEBUG(T) && path->stats.ncalls > 0) {
hsize_t nbytes;
char bandwidth[32];
-
- if(nprint && 0 == (*nprint)++) {
- HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n");
- HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n",
- "Conversion", "Elmts", "Calls", "User",
- "System", "Elapsed", "Bandwidth");
- HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n",
- "----------", "-----", "-----", "----",
- "------", "-------", "---------");
- } /* end if */
+ struct {
+ char *user;
+ char *system;
+ char *elapsed;
+ } timestrs = {
+ H5_timer_get_time_string(path->stats.times.user),
+ H5_timer_get_time_string(path->stats.times.system),
+ H5_timer_get_time_string(path->stats.times.elapsed)
+ };
+
+ if(nprint && 0 == (*nprint)++) {
+ HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n");
+ HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n",
+ "Conversion", "Elmts", "Calls", "User",
+ "System", "Elapsed", "Bandwidth");
+ HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n",
+ "----------", "-----", "-----", "----",
+ "------", "-------", "---------");
+ } /* end if */
if(path->src && path->dst)
nbytes = MAX(H5T_get_size(path->src), H5T_get_size(path->dst));
@@ -120,18 +129,15 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED * path, int H5_ATTR_UNUSED * nprint/*
nbytes = H5T_get_size(path->dst);
else
nbytes = 0;
-
- nbytes *= path->stats.nelmts;
+ nbytes *= path->stats.nelmts;
H5_bandwidth(bandwidth, (double)nbytes, path->stats.times.elapsed);
- HDfprintf(H5DEBUG(T), " %-16s %10Hd %10d %8T %8T %8T %10s\n",
- path->name,
- path->stats.nelmts,
- path->stats.ncalls,
- path->stats.times.user,
- path->stats.times.system,
- path->stats.times.elapsed,
- bandwidth);
- } /* end if */
+ HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n",
+ path->name, path->stats.nelmts, path->stats.ncalls,
+ timestrs.user, timestrs.system, timestrs.elapsed, bandwidth);
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
+ }
#endif
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -417,7 +423,7 @@ H5T_debug(const H5T_t *dt, FILE *stream)
HDfprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]);
for (k = 0; k < base_size; k++)
- HDfprintf(stream, "%02p", ((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k));
+ HDfprintf(stream, "%02" PRIx8, *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k));
} /* end for */
HDfprintf(stream, "\n");
}
diff --git a/src/H5Z.c b/src/H5Z.c
index 5c1cfd6..60b2ebe 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -139,8 +139,17 @@ H5Z_term_package(void)
if(H5DEBUG(Z)) {
for(i = 0; i < H5Z_table_used_g; i++) {
for(dir = 0; dir<2; dir++) {
+ struct {
+ char *user;
+ char *system;
+ char *elapsed;
+ } timestrs = {
+ H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.user),
+ H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.system),
+ H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.elapsed)
+ };
if(0 == H5Z_stat_table_g[i].stats[dir].total)
- continue;
+ goto next;
if(0 == nprint++) {
/* Print column headers */
@@ -161,23 +170,29 @@ H5Z_term_package(void)
comment[sizeof(comment) - 1] = '\0';
/*
- * Format bandwidth to have four significant digits and
- * units of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or
- * the word `Inf' if the elapsed time is zero.
- */
+ * Format bandwidth to have four significant digits and
+ * units of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or
+ * the word `Inf' if the elapsed time is zero.
+ */
H5_bandwidth(bandwidth,
(double)(H5Z_stat_table_g[i].stats[dir].total),
H5Z_stat_table_g[i].stats[dir].times.elapsed);
/* Print the statistics */
- HDfprintf(H5DEBUG(Z), " %s%-15s %10Hd %10Hd %8T %8T %8T %10s\n",
- (dir ? "<" : ">"), comment,
- H5Z_stat_table_g[i].stats[dir].total,
- H5Z_stat_table_g[i].stats[dir].errors,
- H5Z_stat_table_g[i].stats[dir].times.user,
- H5Z_stat_table_g[i].stats[dir].times.system,
- H5Z_stat_table_g[i].stats[dir].times.elapsed,
- bandwidth);
+ HDfprintf(H5DEBUG(Z),
+ " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE
+ " %8s %8s %8s %10s\n",
+ (dir ? "<" : ">"), comment,
+ H5Z_stat_table_g[i].stats[dir].total,
+ H5Z_stat_table_g[i].stats[dir].errors,
+ timestrs.user,
+ timestrs.system,
+ timestrs.elapsed,
+ bandwidth);
+ next:
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
} /* end for */
} /* end for */
} /* end if */
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 819653d..98bb8a0 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -99,7 +99,7 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
for(u = 0; u < buf_size; u += 16) {
uint8_t c;
- HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset);
+ HDfprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset);
/* Print the hex values */
for(v = 0; v < 16; v++) {
diff --git a/src/H5private.h b/src/H5private.h
index 9c5b450..5f9652c 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -687,6 +687,11 @@ typedef struct {
#ifndef HDacos
#define HDacos(X) acos(X)
#endif /* HDacos */
+#ifndef HDvasprintf
+# ifdef H5_HAVE_VASPRINTF
+# define HDvasprintf(RET,FMT,A) vasprintf(RET,FMT,A)
+# endif /* H5_HAVE_VASPRINTF */
+#endif /* HDvasprintf */
#ifndef HDalarm
#ifdef H5_HAVE_ALARM
#define HDalarm(N) alarm(N)
@@ -912,10 +917,12 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDfork
#define HDfork() fork()
#endif /* HDfork */
+#ifndef HDfprintf
+#define HDfprintf fprintf
+#endif
#ifndef HDfpathconf
#define HDfpathconf(F,N) fpathconf(F,N)
#endif /* HDfpathconf */
-H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDfputc
#define HDfputc(C,F) fputc(C,F)
#endif /* HDfputc */
@@ -1248,7 +1255,7 @@ typedef off_t h5_stat_size_t;
#define HDpread(F,B,C,O) pread(F,B,C,O)
#endif /* HDpread */
#ifndef HDprintf
- #define HDprintf(...) HDfprintf(stdout, __VA_ARGS__)
+ #define HDprintf printf
#endif /* HDprintf */
#ifndef HDputc
#define HDputc(C,F) putc(C,F)
@@ -1613,9 +1620,6 @@ typedef off_t h5_stat_size_t;
#ifndef HDva_start
#define HDva_start(A,P) va_start(A,P)
#endif /* HDva_start */
-#ifndef HDvasprintf
- #define HDvasprintf(RET,FMT,A) vasprintf(RET,FMT,A)
-#endif /* HDvasprintf */
#ifndef HDvfprintf
#define HDvfprintf(F,FMT,A) vfprintf(F,FMT,A)
#endif /* HDvfprintf */
diff --git a/src/H5public.h b/src/H5public.h
index 249cc1d..5216906 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -176,42 +176,88 @@ typedef long long ssize_t;
#endif
#endif
+/* int64_t type is used for creation order field for links. It may be
+ * defined in Posix.1g, otherwise it is defined here.
+ */
+#if H5_SIZEOF_INT64_T>=8
+#elif H5_SIZEOF_INT>=8
+ typedef int int64_t;
+# undef H5_SIZEOF_INT64_T
+# define H5_SIZEOF_INT64_T H5_SIZEOF_INT
+#elif H5_SIZEOF_LONG>=8
+ typedef long int64_t;
+# undef H5_SIZEOF_INT64_T
+# define H5_SIZEOF_INT64_T H5_SIZEOF_LONG
+#elif H5_SIZEOF_LONG_LONG>=8
+ typedef long long int64_t;
+# undef H5_SIZEOF_INT64_T
+# define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG
+#else
+# error "nothing appropriate for int64_t"
+#endif
+
+/* uint64_t type is used for fields for H5O_info_t. It may be
+ * defined in Posix.1g, otherwise it is defined here.
+ */
+#if H5_SIZEOF_UINT64_T>=8
+#ifndef UINT64_MAX
+#define UINT64_MAX ((uint64_t)-1)
+#endif
+#elif H5_SIZEOF_INT>=8
+ typedef unsigned uint64_t;
+# define UINT64_MAX UINT_MAX
+# undef H5_SIZEOF_UINT64_T
+# define H5_SIZEOF_UINT64_T H5_SIZEOF_INT
+#elif H5_SIZEOF_LONG>=8
+ typedef unsigned long uint64_t;
+# define UINT64_MAX ULONG_MAX
+# undef H5_SIZEOF_UINT64_T
+# define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG
+#elif H5_SIZEOF_LONG_LONG>=8
+ typedef unsigned long long uint64_t;
+# define UINT64_MAX ULLONG_MAX
+# undef H5_SIZEOF_UINT64_T
+# define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG
+#else
+# error "nothing appropriate for uint64_t"
+#endif
+
/*
* The sizes of file objects have their own types defined here, use a 64-bit
* type.
*/
-#if H5_SIZEOF_LONG_LONG >= 8
-H5_GCC_DIAG_OFF("long-long")
-typedef unsigned long long hsize_t;
-typedef signed long long hssize_t;
-H5_GCC_DIAG_ON("long-long")
-# define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG
-# define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG
-#else
-# error "nothing appropriate for hsize_t"
-#endif
-#define HSIZE_UNDEF ((hsize_t)(hssize_t)(-1))
+typedef uint64_t hsize_t;
+typedef int64_t hssize_t;
+#define PRIdHSIZE PRId64
+#define PRIiHSIZE PRIi64
+#define PRIoHSIZE PRIo64
+#define PRIuHSIZE PRIu64
+#define PRIxHSIZE PRIx64
+#define PRIXHSIZE PRIX64
+#define H5_SIZEOF_HSIZE_T H5_SIZEOF_UINT64_T
+#define H5_SIZEOF_HSSIZE_T H5_SIZEOF_INT64_T
+#define HSIZE_UNDEF UINT64_MAX
/*
* File addresses have their own types.
*/
#if H5_SIZEOF_INT >= 8
typedef unsigned haddr_t;
-# define HADDR_UNDEF ((haddr_t)(-1))
+# define HADDR_UNDEF UINT_MAX
# define H5_SIZEOF_HADDR_T H5_SIZEOF_INT
# ifdef H5_HAVE_PARALLEL
# define HADDR_AS_MPI_TYPE MPI_UNSIGNED
# endif /* H5_HAVE_PARALLEL */
#elif H5_SIZEOF_LONG >= 8
typedef unsigned long haddr_t;
-# define HADDR_UNDEF ((haddr_t)(long)(-1))
+# define HADDR_UNDEF ULONG_MAX
# define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG
# ifdef H5_HAVE_PARALLEL
# define HADDR_AS_MPI_TYPE MPI_UNSIGNED_LONG
# endif /* H5_HAVE_PARALLEL */
#elif H5_SIZEOF_LONG_LONG >= 8
typedef unsigned long long haddr_t;
-# define HADDR_UNDEF ((haddr_t)(long long)(-1))
+# define HADDR_UNDEF ULLONG_MAX
# define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG_LONG
# ifdef H5_HAVE_PARALLEL
# define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT
@@ -220,14 +266,27 @@ H5_GCC_DIAG_ON("long-long")
# error "nothing appropriate for haddr_t"
#endif
#if H5_SIZEOF_HADDR_T == H5_SIZEOF_INT
-# define H5_PRINTF_HADDR_FMT "%u"
+# define PRIXHADDR "X"
+# define PRIoHADDR "o"
+# define PRIuHADDR "u"
+# define PRIxHADDR "x"
+# define PRIXHADDR "X"
#elif H5_SIZEOF_HADDR_T == H5_SIZEOF_LONG
-# define H5_PRINTF_HADDR_FMT "%lu"
+# define PRIXHADDR "lX"
+# define PRIoHADDR "lo"
+# define PRIuHADDR "lu"
+# define PRIxHADDR "lx"
+# define PRIXHADDR "lX"
#elif H5_SIZEOF_HADDR_T == H5_SIZEOF_LONG_LONG
-# define H5_PRINTF_HADDR_FMT "%" H5_PRINTF_LL_WIDTH "u"
+# define PRIXHADDR H5_PRINTF_LL_WIDTH "X"
+# define PRIoHADDR H5_PRINTF_LL_WIDTH "o"
+# define PRIuHADDR H5_PRINTF_LL_WIDTH "u"
+# define PRIxHADDR H5_PRINTF_LL_WIDTH "x"
+# define PRIXHADDR H5_PRINTF_LL_WIDTH "X"
#else
-# error "nothing appropriate for H5_PRINTF_HADDR_FMT"
+# error "nothing appropriate for PRI.HADDR"
#endif
+#define H5_PRINTF_HADDR_FMT "%" PRIuHADDR
#define HADDR_MAX (HADDR_UNDEF-1)
/* uint32_t type is used for creation order field for messages. It may be
@@ -250,46 +309,6 @@ H5_GCC_DIAG_ON("long-long")
# error "nothing appropriate for uint32_t"
#endif
-/* int64_t type is used for creation order field for links. It may be
- * defined in Posix.1g, otherwise it is defined here.
- */
-#if H5_SIZEOF_INT64_T>=8
-#elif H5_SIZEOF_INT>=8
- typedef int int64_t;
-# undef H5_SIZEOF_INT64_T
-# define H5_SIZEOF_INT64_T H5_SIZEOF_INT
-#elif H5_SIZEOF_LONG>=8
- typedef long int64_t;
-# undef H5_SIZEOF_INT64_T
-# define H5_SIZEOF_INT64_T H5_SIZEOF_LONG
-#elif H5_SIZEOF_LONG_LONG>=8
- typedef long long int64_t;
-# undef H5_SIZEOF_INT64_T
-# define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG
-#else
-# error "nothing appropriate for int64_t"
-#endif
-
-/* uint64_t type is used for fields for H5O_info_t. It may be
- * defined in Posix.1g, otherwise it is defined here.
- */
-#if H5_SIZEOF_UINT64_T>=8
-#elif H5_SIZEOF_INT>=8
- typedef unsigned uint64_t;
-# undef H5_SIZEOF_UINT64_T
-# define H5_SIZEOF_UINT64_T H5_SIZEOF_INT
-#elif H5_SIZEOF_LONG>=8
- typedef unsigned long uint64_t;
-# undef H5_SIZEOF_UINT64_T
-# define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG
-#elif H5_SIZEOF_LONG_LONG>=8
- typedef unsigned long long uint64_t;
-# undef H5_SIZEOF_UINT64_T
-# define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG
-#else
-# error "nothing appropriate for uint64_t"
-#endif
-
/* Common iteration orders */
typedef enum {
H5_ITER_UNKNOWN = -1, /* Unknown order */
diff --git a/src/H5system.c b/src/H5system.c
index d664038..edb44ae 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -73,408 +73,35 @@
/* Track whether tzset routine was called */
static hbool_t H5_ntzset = FALSE;
-
-/*-------------------------------------------------------------------------
- * Function: HDfprintf
- *
- * Purpose: Prints the optional arguments under the control of the format
- * string FMT to the stream STREAM. This function takes the
- * same format as fprintf(3c) with a few added features:
- *
- * The conversion modifier `H' refers to the size of an
- * `hsize_t' or `hssize_t' type. For instance, "0x%018Hx"
- * prints an `hsize_t' value as a hex number right justified and
- * zero filled in an 18-character field.
- *
- * The conversion 'a' refers to an haddr_t type.
- *
- * The conversion 't' refers to an htri_t type.
- *
- * The conversion 'k' refers to an H5O_token_t type.
- *
- * Return: Success: Number of characters printed
- *
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Thursday, April 9, 1998
- *
- *-------------------------------------------------------------------------
+#ifndef HDvasprintf
+/* HDvasprintf provides vasprintf-like function on targets where it is
+ * unavailable.
*/
-/* Disable warning for "format not a string literal" here -QAK */
-/*
- * This pragma only needs to surround the fprintf() calls with
- * format_templ in the code below, but early (4.4.7, at least) gcc only
- * allows diagnostic pragmas to be toggled outside of functions.
- */
-H5_GCC_DIAG_OFF("format-nonliteral")
int
-HDfprintf(FILE *stream, const char *fmt, ...)
+HDvasprintf(char **bufp, const char *fmt, va_list _ap)
{
- int n=0, nout = 0;
- int fwidth, prec;
- int zerofill;
- int leftjust;
- int plussign;
- int ldspace;
- int prefix;
- char modifier[8];
- int conv;
- char *rest, format_templ[128];
- int len;
- const char *s;
- va_list ap;
-
- HDassert(stream);
- HDassert(fmt);
-
- HDva_start (ap, fmt);
- while (*fmt) {
- fwidth = prec = 0;
- zerofill = 0;
- leftjust = 0;
- plussign = 0;
- prefix = 0;
- ldspace = 0;
- modifier[0] = '\0';
-
- if ('%'==fmt[0] && '%'==fmt[1]) {
- HDputc ('%', stream);
- fmt += 2;
- nout++;
- } else if ('%'==fmt[0]) {
- s = fmt + 1;
-
- /* Flags */
- while(HDstrchr("-+ #", *s)) {
- switch(*s) {
- case '-':
- leftjust = 1;
- break;
-
- case '+':
- plussign = 1;
- break;
-
- case ' ':
- ldspace = 1;
- break;
-
- case '#':
- prefix = 1;
- break;
-
- default:
- HDassert(0 && "Unknown format flag");
- } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */
- s++;
- } /* end while */
-
- /* Field width */
- if(HDisdigit(*s)) {
- zerofill = ('0' == *s);
- fwidth = (int)HDstrtol (s, &rest, 10);
- s = rest;
- } /* end if */
- else if ('*'==*s) {
- fwidth = HDva_arg(ap, int);
- if(fwidth < 0) {
- leftjust = 1;
- fwidth = -fwidth;
- }
- s++;
- }
-
- /* Precision */
- if('.'==*s) {
- s++;
- if(HDisdigit(*s)) {
- prec = (int)HDstrtol(s, &rest, 10);
- s = rest;
- } else if('*'==*s) {
- prec = HDva_arg(ap, int);
- s++;
- }
- if(prec < 1)
- prec = 1;
- }
-
- /* Extra type modifiers */
- if(HDstrchr("zZHhlqLI", *s)) {
- switch(*s) {
- /*lint --e{506} Don't issue warnings about constant value booleans */
- /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */
- case 'H':
- if(sizeof(hsize_t) < sizeof(long))
- modifier[0] = '\0';
- else if(sizeof(hsize_t) == sizeof(long)) {
- HDstrncpy(modifier, "l", sizeof(modifier));
- modifier[sizeof(modifier) - 1] = '\0';
- } /* end if */
- else {
- HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, sizeof(modifier));
- modifier[sizeof(modifier) - 1] = '\0';
- } /* end else */
- break;
-
- case 'Z':
- case 'z':
- if(sizeof(size_t) < sizeof(long))
- modifier[0] = '\0';
- else if(sizeof(size_t) == sizeof(long)) {
- HDstrncpy(modifier, "l", sizeof(modifier));
- modifier[sizeof(modifier) - 1] = '\0';
- } /* end if */
- else {
- HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, sizeof(modifier));
- modifier[sizeof(modifier) - 1] = '\0';
- } /* end else */
- break;
-
- default:
- /* Handle 'I64' modifier for Microsoft's "__int64" type */
- if(*s=='I' && *(s+1)=='6' && *(s+2)=='4') {
- modifier[0] = *s;
- modifier[1] = *(s+1);
- modifier[2] = *(s+2);
- modifier[3] = '\0';
- s += 2; /* Increment over 'I6', the '4' is taken care of below */
- } /* end if */
- else {
- /* Handle 'll' for long long types */
- if(*s=='l' && *(s+1)=='l') {
- modifier[0] = *s;
- modifier[1] = *s;
- modifier[2] = '\0';
- s++; /* Increment over first 'l', second is taken care of below */
- } /* end if */
- else {
- modifier[0] = *s;
- modifier[1] = '\0';
- } /* end else */
- } /* end else */
- break;
- }
- s++;
- }
-
- /* Conversion */
- conv = *s++;
-
- /* Create the format template */
- len = 0;
- len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s", (leftjust ? "-" : ""),
- (plussign ? "+" : ""), (ldspace ? " " : ""),
- (prefix ? "#" : ""), (zerofill ? "0" : ""));
- if(fwidth > 0)
- len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth);
- if(prec > 0)
- len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), ".%d", prec);
- if(*modifier)
- len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%s", modifier);
- HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%c", conv);
-
- /* Conversion */
- switch (conv) {
- case 'd':
- case 'i':
- if(!HDstrcmp(modifier, "h")) {
- short x = (short)HDva_arg(ap, int);
- n = fprintf(stream, format_templ, x);
- } else if(!*modifier) {
- int x = HDva_arg(ap, int);
- n = fprintf(stream, format_templ, x);
- } else if(!HDstrcmp(modifier, "l")) {
- long x = HDva_arg(ap, long);
- n = fprintf(stream, format_templ, x);
- } else {
- int64_t x = HDva_arg(ap, int64_t);
- n = fprintf(stream, format_templ, x);
- }
- break;
-
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- if(!HDstrcmp(modifier, "h")) {
- unsigned short x = (unsigned short)HDva_arg(ap, unsigned int);
- n = fprintf(stream, format_templ, x);
- } else if(!*modifier) {
- unsigned int x = HDva_arg(ap, unsigned int);
- n = fprintf(stream, format_templ, x);
- } else if(!HDstrcmp(modifier, "l")) {
- unsigned long x = HDva_arg(ap, unsigned long);
- n = fprintf(stream, format_templ, x);
- } else {
- uint64_t x = HDva_arg(ap, uint64_t);
- n = fprintf(stream, format_templ, x);
- }
- break;
-
- case 'f':
- case 'e':
- case 'E':
- case 'g':
- case 'G':
- if(!HDstrcmp(modifier, "h")) {
- float x = (float)HDva_arg(ap, double);
- n = fprintf(stream, format_templ, (double)x);
- } else if(!*modifier || !HDstrcmp(modifier, "l")) {
- double x = HDva_arg(ap, double);
- n = fprintf(stream, format_templ, x);
- } else {
- /*
- * Some compilers complain when `long double' and
- * `double' are the same thing.
- */
-#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
- long double x = HDva_arg(ap, long double);
- n = fprintf(stream, format_templ, x);
-#else
- double x = HDva_arg(ap, double);
- n = fprintf(stream, format_templ, x);
-#endif
- }
- break;
-
- case 'a':
- {
- haddr_t x = HDva_arg(ap, haddr_t);
-
- if(H5F_addr_defined(x)) {
- len = 0;
- len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s",
- (leftjust ? "-" : ""), (plussign ? "+" : ""),
- (ldspace ? " " : ""), (prefix ? "#" : ""),
- (zerofill ? "0" : ""));
- if(fwidth > 0)
- len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth);
-
- /*lint --e{506} Don't issue warnings about constant value booleans */
- /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */
- if(sizeof(x) == H5_SIZEOF_INT) {
- HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1)));
- len++;
- } /* end if */
- else if(sizeof(x) == H5_SIZEOF_LONG) {
- HDstrncat(format_templ, "lu", (sizeof(format_templ) - (size_t)(len + 1)));
- len++;
- } /* end if */
- else if(sizeof(x) == H5_SIZEOF_LONG_LONG) {
- HDstrncat(format_templ, H5_PRINTF_LL_WIDTH, (sizeof(format_templ) - (size_t)(len + 1)));
- len += (int)sizeof(H5_PRINTF_LL_WIDTH);
- HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1)));
- len++;
- }
- n = fprintf(stream, format_templ, x);
- } else {
- len = 0;
- HDstrncpy(format_templ, "%", (sizeof(format_templ) - (size_t)(len + 1)));
- len++;
- if(leftjust) {
- HDstrncat(format_templ, "-", (sizeof(format_templ) - (size_t)(len + 1)));
- len++;
- } /* end if */
- if(fwidth)
- len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth);
- HDstrncat(format_templ, "s", (sizeof(format_templ) - (size_t)(len + 1)));
- n = fprintf(stream, format_templ, "UNDEF");
- }
- }
- break;
-
- case 'c':
- {
- char x = (char)HDva_arg(ap, int);
- n = fprintf(stream, format_templ, x);
- }
- break;
-
- case 's':
- case 'p':
- {
- char *x = HDva_arg(ap, char*);
- n = fprintf(stream, format_templ, x);
- }
- break;
-
- case 'n':
- format_templ[HDstrlen(format_templ) - 1] = 'u';
- n = fprintf(stream, format_templ, nout);
- break;
-
- case 't':
- {
- htri_t tri_var = HDva_arg(ap, htri_t);
-
- if(tri_var > 0)
- n = fprintf(stream, "TRUE");
- else if(!tri_var)
- n = fprintf(stream, "FALSE");
- else
- n = fprintf(stream, "FAIL(%d)", (int)tri_var);
- }
- break;
-
- case 'T': /* Elapsed time, in seconds */
- {
- double seconds = HDva_arg(ap, double);
- char *time_string = H5_timer_get_time_string(seconds);
-
- if(time_string) {
- n = fprintf(stream, format_templ, time_string);
- HDfree(time_string);
- } /* end if */
- else
- n = fprintf(stream, format_templ, "(error)");
- }
- break;
-
- case 'k':
- {
- H5O_token_t token = HDva_arg(ap, H5O_token_t);
-
- /* Print the raw token. */
- n = fprintf(stream, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
- (unsigned char)token.__data[15],
- (unsigned char)token.__data[14],
- (unsigned char)token.__data[13],
- (unsigned char)token.__data[12],
- (unsigned char)token.__data[11],
- (unsigned char)token.__data[10],
- (unsigned char)token.__data[9],
- (unsigned char)token.__data[8],
- (unsigned char)token.__data[7],
- (unsigned char)token.__data[6],
- (unsigned char)token.__data[5],
- (unsigned char)token.__data[4],
- (unsigned char)token.__data[3],
- (unsigned char)token.__data[2],
- (unsigned char)token.__data[1],
- (unsigned char)token.__data[0]
- );
- }
- break;
-
- default:
- HDfputs(format_templ, stream);
- n = (int)HDstrlen(format_templ);
- break;
- }
- nout += n;
- fmt = s;
- } else {
- HDputc(*fmt, stream);
- fmt++;
- nout++;
+ char *buf; /* buffer to receive formatted string */
+ size_t bufsz; /* size of buffer to allocate */
+
+ for (bufsz = 32; (buf = HDmalloc(bufsz)) != NULL; ) {
+ int ret;
+ va_list ap;
+
+ HDva_copy(ap, _ap);
+ ret = HDvsnprintf(buf, bufsz, fmt, ap);
+ va_end(ap);
+ if (ret >= 0 && (size_t)ret < bufsz) {
+ *bufp = buf;
+ return ret;
}
+ HDfree(buf);
+ if (ret < 0)
+ return ret;
+ bufsz = (size_t)ret + 1;
}
- HDva_end(ap);
- return nout;
-} /* end HDfprintf() */
-H5_GCC_DIAG_ON("format-nonliteral")
-
+ return -1;
+}
+#endif
/*-------------------------------------------------------------------------
* Function: HDstrtoll
diff --git a/src/H5trace.c b/src/H5trace.c
index 40967ee..100b6c3 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -269,7 +269,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
haddr_t addr = HDva_arg(ap, haddr_t);
- HDfprintf(out, "%a", addr);
+ HDfprintf(out, "%" PRIuHADDR, addr);
} /* end else */
break;
@@ -824,7 +824,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *);
- HDfprintf(out, "0x%p", error);
+ HDfprintf(out, "0x%p", (void *)error);
} /* end else */
break;
@@ -1156,7 +1156,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t*);
- HDfprintf(out, "0x%p", statbuf);
+ HDfprintf(out, "0x%p", (void *)statbuf);
}
break;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1179,7 +1179,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if(H5S_UNLIMITED == p[i])
HDfprintf(out, "%sH5S_UNLIMITED", (i ? ", " : ""));
else
- HDfprintf(out, "%s%Hu", (i ? ", " : ""), p[i]);
+ HDfprintf(out, "%s%" PRIuHSIZE, (i ? ", " : ""), p[i]);
} /* end for */
HDfprintf(out, "}");
} /* end if */
@@ -1193,7 +1193,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if(H5S_UNLIMITED == hsize)
HDfprintf(out, "H5S_UNLIMITED");
else {
- HDfprintf(out, "%Hu", hsize);
+ HDfprintf(out, "%" PRIuHSIZE, hsize);
asize[argno] = (hssize_t)hsize;
} /* end else */
} /* end else */
@@ -1210,7 +1210,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, " {");
for(i = 0; i < asize[asize_idx]; i++)
- HDfprintf(out, "%s%Hd", (i ? ", " : ""), p[i]);
+ HDfprintf(out, "%s%" PRIdHSIZE, (i ? ", " : ""), p[i]);
HDfprintf(out, "}");
} /* end if */
} /* end if */
@@ -1220,7 +1220,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
hssize_t hssize = HDva_arg(ap, hssize_t);
- HDfprintf(out, "%Hd", hssize);
+ HDfprintf(out, "%" PRIdHSIZE, hssize);
asize[argno] = (hssize_t)hssize;
} /* end else */
break;
@@ -1899,7 +1899,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
hobj_ref_t ref = HDva_arg(ap, hobj_ref_t);
- HDfprintf(out, "Reference Object=%a", ref);
+ HDfprintf(out, "Reference Object=%" PRIuHADDR, ref);
} /* end else */
break;
@@ -3562,7 +3562,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, " {");
for(i = 0; i < asize[asize_idx]; i++)
- HDfprintf(out, "%s%Zu", (i ? ", " : ""), p[i]);
+ HDfprintf(out, "%s%zu", (i ? ", " : ""), p[i]);
HDfprintf(out, "}");
} /* end if */
} /* end if */
@@ -3572,7 +3572,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
size_t size = HDva_arg(ap, size_t);
- HDfprintf(out, "%Zu", size);
+ HDfprintf(out, "%zu", size);
asize[argno] = (hssize_t)size;
} /* end else */
break;
@@ -3619,7 +3619,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t*);
- HDfprintf(out, "0x%p", filter);
+ HDfprintf(out, "0x%p", (void *)filter);
} /* end else */
break;
@@ -3668,7 +3668,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, " {");
for(i = 0; i < asize[asize_idx]; i++)
- HDfprintf(out, "%s%Zd", (i ? ", " : ""), p[i]);
+ HDfprintf(out, "%s%zd", (i ? ", " : ""), p[i]);
HDfprintf(out, "}");
} /* end if */
} /* end if */
@@ -3678,7 +3678,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
ssize_t ssize = HDva_arg(ap, ssize_t);
- HDfprintf(out, "%Zd", ssize);
+ HDfprintf(out, "%zd", ssize);
asize[argno] = (hssize_t)ssize;
} /* end else */
break;
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 71162eb..cc70e94 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -31,33 +31,40 @@
# define PRIoPTR "llo"
# define PRIuPTR "llu"
# define PRIxPTR "llx"
+# define PRIXPTR "llX"
#else /* _WIN64 */
# define PRIdPTR "ld"
# define PRIoPTR "lo"
# define PRIuPTR "lu"
# define PRIxPTR "lx"
+# define PRIXPTR "lX"
#endif /* _WIN64 */
# define PRId8 "d"
# define PRIo8 "o"
# define PRIu8 "u"
# define PRIx8 "x"
+# define PRIX8 "X"
# define PRId16 "d"
# define PRIo16 "o"
# define PRIu16 "u"
# define PRIx16 "x"
+# define PRIX16 "X"
# define PRId32 "d"
# define PRIo32 "o"
# define PRIu32 "u"
# define PRIx32 "x"
+# define PRIX32 "X"
# define PRId64 "lld"
# define PRIo64 "llo"
# define PRIu64 "llu"
# define PRIx64 "llx"
+# define PRIX64 "llX"
# define PRIdMAX "lld"
# define PRIoMAX "llo"
# define PRIuMAX "llu"
# define PRIxMAX "llx"
+# define PRIXMAX "llX"
#endif
/*
diff --git a/test/accum.c b/test/accum.c
index 3947aff..4b0ec64 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -2061,15 +2061,16 @@ accum_printf(const H5F_t *f)
HDprintf("=====================================================\n");
HDprintf(" accumulator allocated size == %zu\n", accum->alloc_size);
HDprintf(" accumulated data size == %zu\n", accum->size);
- HDfprintf(stdout, " accumulator dirty? == %t\n", accum->dirty);
+ HDfprintf(stdout, " accumulator dirty? == %s\n",
+ accum->dirty ? "TRUE" : "FALSE");
HDprintf("=====================================================\n");
- HDfprintf(stdout, " start of accumulated data, loc = %a\n", accum->loc);
+ HDfprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc);
if(accum->dirty) {
- HDfprintf(stdout, " start of dirty region, loc = %a\n", (haddr_t)(accum->loc + accum->dirty_off));
- HDfprintf(stdout, " end of dirty region, loc = %a\n", (haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len));
+ HDfprintf(stdout, " start of dirty region, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->dirty_off));
+ HDfprintf(stdout, " end of dirty region, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len));
} /* end if */
- HDfprintf(stdout, " end of accumulated data, loc = %a\n", (haddr_t)(accum->loc + accum->size));
- HDfprintf(stdout, " end of accumulator allocation, loc = %a\n", (haddr_t)(accum->loc + accum->alloc_size));
+ HDfprintf(stdout, " end of accumulated data, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->size));
+ HDfprintf(stdout, " end of accumulator allocation, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->alloc_size));
HDprintf("=====================================================\n");
}
HDprintf("\n\n");
diff --git a/test/big.c b/test/big.c
index a0d767f..ae0cec0 100644
--- a/test/big.c
+++ b/test/big.c
@@ -433,7 +433,7 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n)
for (i=0; i<wrt_n; i++) {
/* start position must be at least hs_size from the end */
hs_start[0] = randll (size2[0]-hs_size[0], i);
- HDfprintf (out, "#%03d 0x%016Hx\n", i, hs_start[0]);
+ HDfprintf (out, "#%03d 0x%016" PRIxHSIZE "\n", i, hs_start[0]);
if (H5Sselect_hyperslab (space2, H5S_SELECT_SET, hs_start, NULL,
hs_size, NULL) < 0) goto error;
for (j=0; j<WRT_SIZE; j++) {
@@ -515,7 +515,7 @@ reader(char *filename, hid_t fapl)
break;
i = (int)HDstrtol(ln + 1, &s, 10);
hs_offset[0] = HDstrtoull(s, NULL, 0);
- HDfprintf(stdout, "#%03d 0x%016Hx%47s", i, hs_offset[0], "");
+ HDfprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], "");
HDfflush(stdout);
if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL,
@@ -590,7 +590,7 @@ usage(void)
"\t-c\tFile system Checking skipped. Caution: this test generates\n"
"\t\tmany big files and may fill up the file system.\n"
"\t-fsize\tChange family size default to <fsize> where <fsize> is\n"
- "\t\ta positive float point number. Default value is %Hu.\n"
+ "\t\ta positive float point number. Default value is %" PRIuHSIZE ".\n"
"Examples:\n"
"\tbig -fsize 2.1e9 \t# test with file size just under 2GB\n"
"\tbig -fsize 2.2e9 \t# test with file size just above 2GB\n"
diff --git a/test/cache_common.c b/test/cache_common.c
index 52ff33e..d0b8632 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -830,13 +830,15 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
if((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) {
HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n",
type, idx, (long)addr);
- HDfprintf(stdout, "*image = 0x%x 0x%x 0x%x\n",
- (int)(*((const char *)image)),
- (int)(*(((const char *)image) + 1)),
- (int)(*(((const char *)image) + 2)));
- HDfprintf(stdout, "expected *image = 0x%x\n",
- (int)(idx & 0xFF),
- (int)((idx & 0xFF00) >> 8));
+ HDfprintf(stdout,
+ "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n",
+ (*((const uint8_t *)image)),
+ (*(((const uint8_t *)image) + 1)),
+ (*(((const uint8_t *)image) + 2)));
+ HDfprintf(stdout,
+ "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n",
+ (uint32_t)idx & 0xFF,
+ (((uint32_t)idx & 0xFF00) >> 8));
} /* end if */
HDassert((*((const char *)image)) == (char)(type & 0xFF));
HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8));
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 3ed1d56..942c01a 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -337,7 +337,7 @@ verify_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end)
/* Verify that read chunk is the same as the corresponding written one */
if(HDmemcmp(expected_buf[chk_index], read_buf, CHUNK_NX*CHUNK_NY) != 0)
{
- HDfprintf(stderr, "Read chunk differs from written chunk at offset (%d,%d)\n", offset[0], offset[1]);
+ HDfprintf(stderr, "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n", offset[0], offset[1]);
return FAIL;
}
}
diff --git a/test/dsets.c b/test/dsets.c
index ae917cc..c06ac97 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -4308,7 +4308,7 @@ test_nbit_int_size(hid_t file)
if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) ||
dset_size > DSET_DIM1*DSET_DIM2*(precision/8) + 1*KB) {
H5_FAILED();
- HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n",__LINE__, dset_size);
+ HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n",__LINE__, dset_size);
goto error;
}
@@ -4522,7 +4522,7 @@ test_nbit_flt_size(hid_t file)
if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) ||
dset_size > DSET_DIM1*DSET_DIM2*(precision/8) + 1*KB) {
H5_FAILED();
- HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n",__LINE__, dset_size);
+ HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n",__LINE__, dset_size);
goto error;
} /* end if */
diff --git a/test/earray.c b/test/earray.c
index f593212..8f99331 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -340,44 +340,44 @@ check_stats(const H5EA_t *ea, const earray_state_t *state)
/* Compare information */
if(earray_stats.stored.max_idx_set != state->max_idx_set) {
- HDfprintf(stdout, "earray_stats.stored.max_idx_set = %Hu, state->max_idx_set = %Hu\n", earray_stats.stored.max_idx_set, state->max_idx_set);
+ HDfprintf(stdout, "earray_stats.stored.max_idx_set = %" PRIuHSIZE ", state->max_idx_set = %" PRIuHSIZE "\n", earray_stats.stored.max_idx_set, state->max_idx_set);
TEST_ERROR
} /* end if */
if(earray_stats.stored.nelmts != state->nelmts) {
- HDfprintf(stdout, "earray_stats.stored.nelmts = %Hu, state->nelmts = %Hu\n", earray_stats.stored.nelmts, state->nelmts);
+ HDfprintf(stdout, "earray_stats.stored.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n", earray_stats.stored.nelmts, state->nelmts);
TEST_ERROR
} /* end if */
if(earray_stats.computed.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "earray_stats.computed.hdr_size = %Hu, state->hdr_size = %Hu\n", earray_stats.computed.hdr_size, state->hdr_size);
+ HDfprintf(stdout, "earray_stats.computed.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n", earray_stats.computed.hdr_size, state->hdr_size);
TEST_ERROR
} /* end if */
if(earray_stats.computed.nindex_blks != state->nindex_blks) {
- HDfprintf(stdout, "earray_stats.computed.nindex_blks = %Hu, state->nindex_blks = %Hu\n", earray_stats.computed.nindex_blks, state->nindex_blks);
+ HDfprintf(stdout, "earray_stats.computed.nindex_blks = %" PRIuHSIZE ", state->nindex_blks = %" PRIuHSIZE "\n", earray_stats.computed.nindex_blks, state->nindex_blks);
TEST_ERROR
} /* end if */
if(earray_stats.computed.index_blk_size != state->index_blk_size) {
- HDfprintf(stdout, "earray_stats.computed.index_blk_size = %Hu, state->index_blk_size = %Hu\n", earray_stats.computed.index_blk_size, state->index_blk_size);
+ HDfprintf(stdout, "earray_stats.computed.index_blk_size = %" PRIuHSIZE ", state->index_blk_size = %" PRIuHSIZE "\n", earray_stats.computed.index_blk_size, state->index_blk_size);
TEST_ERROR
} /* end if */
if(earray_stats.stored.ndata_blks != state->ndata_blks) {
- HDfprintf(stdout, "earray_stats.stored.ndata_blks = %Hu, state->ndata_blks = %Hu\n", earray_stats.stored.ndata_blks, state->ndata_blks);
+ HDfprintf(stdout, "earray_stats.stored.ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n", earray_stats.stored.ndata_blks, state->ndata_blks);
TEST_ERROR
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if(earray_stats.stored.data_blk_size != state->data_blk_size) {
- HDfprintf(stdout, "earray_stats.stored.data_blk_size = %Hu, state->data_blk_size = %Hu\n", earray_stats.stored.data_blk_size, state->data_blk_size);
+ HDfprintf(stdout, "earray_stats.stored.data_blk_size = %" PRIuHSIZE ", state->data_blk_size = %" PRIuHSIZE "\n", earray_stats.stored.data_blk_size, state->data_blk_size);
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
if(earray_stats.stored.nsuper_blks != state->nsuper_blks) {
- HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %Hu, state->nsuper_blks = %Hu\n", earray_stats.stored.nsuper_blks, state->nsuper_blks);
+ HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n", earray_stats.stored.nsuper_blks, state->nsuper_blks);
TEST_ERROR
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if(earray_stats.stored.super_blk_size != state->super_blk_size) {
- HDfprintf(stdout, "earray_stats.stored.super_blk_size = %Hu, state->super_blk_size = %Hu\n", earray_stats.stored.super_blk_size, state->super_blk_size);
+ HDfprintf(stdout, "earray_stats.stored.super_blk_size = %" PRIuHSIZE ", state->super_blk_size = %" PRIuHSIZE "\n", earray_stats.stored.super_blk_size, state->super_blk_size);
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
diff --git a/test/farray.c b/test/farray.c
index b647b51..b29768e 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -189,19 +189,19 @@ check_stats(const H5FA_t *fa, const farray_state_t *state)
/* Compare information */
if (farray_stats.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n",
+ HDfprintf(stdout, "farray_stats.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
farray_stats.hdr_size, state->hdr_size);
TEST_ERROR
}
if (farray_stats.dblk_size != state->dblk_size) {
- HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n",
+ HDfprintf(stdout, "farray_stats.dblk_size = %" PRIuHSIZE ", state->dblk_size = %" PRIuHSIZE "\n",
farray_stats.dblk_size, state->dblk_size);
TEST_ERROR
}
if (farray_stats.nelmts != state->nelmts) {
- HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n",
+ HDfprintf(stdout, "farray_stats.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
farray_stats.nelmts, state->nelmts);
TEST_ERROR
}
diff --git a/test/fheap.c b/test/fheap.c
index 18d16a1..715b935 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -277,35 +277,35 @@ check_stats(const H5HF_t *fh, const fheap_heap_state_t *state)
if(H5HF_stat_info(fh, &heap_stats) < 0)
FAIL_STACK_ERROR
if(heap_stats.man_nobjs != state->man_nobjs) {
- HDfprintf(stdout, "heap_stats.man_nobjs = %Hu, state->man_nobjs = %Zu\n", heap_stats.man_nobjs, state->man_nobjs);
+ HDfprintf(stdout, "heap_stats.man_nobjs = %" PRIuHSIZE ", state->man_nobjs = %zu\n", heap_stats.man_nobjs, state->man_nobjs);
TEST_ERROR
} /* end if */
if(heap_stats.man_size != state->man_size) {
- HDfprintf(stdout, "heap_stats.man_size = %Hu, state->man_size = %Hu\n", heap_stats.man_size, state->man_size);
+ HDfprintf(stdout, "heap_stats.man_size = %" PRIuHSIZE ", state->man_size = %" PRIuHSIZE "\n", heap_stats.man_size, state->man_size);
TEST_ERROR
} /* end if */
if(heap_stats.man_alloc_size != state->man_alloc_size) {
- HDfprintf(stdout, "heap_stats.man_alloc_size = %Hu, state->man_alloc_size = %Hu\n", heap_stats.man_alloc_size, state->man_alloc_size);
+ HDfprintf(stdout, "heap_stats.man_alloc_size = %" PRIuHSIZE ", state->man_alloc_size = %" PRIuHSIZE "\n", heap_stats.man_alloc_size, state->man_alloc_size);
TEST_ERROR
} /* end if */
if(heap_stats.man_free_space != state->man_free_space) {
- HDfprintf(stdout, "heap_stats.man_free_space = %Hu, state->man_free_space = %Hu\n", heap_stats.man_free_space, state->man_free_space);
+ HDfprintf(stdout, "heap_stats.man_free_space = %" PRIuHSIZE ", state->man_free_space = %" PRIuHSIZE "\n", heap_stats.man_free_space, state->man_free_space);
TEST_ERROR
} /* end if */
if(heap_stats.huge_nobjs != state->huge_nobjs) {
- HDfprintf(stdout, "heap_stats.huge_nobjs = %Hu, state->huge_nobjs = %Zu\n", heap_stats.huge_nobjs, state->huge_nobjs);
+ HDfprintf(stdout, "heap_stats.huge_nobjs = %" PRIuHSIZE ", state->huge_nobjs = %zu\n", heap_stats.huge_nobjs, state->huge_nobjs);
TEST_ERROR
} /* end if */
if(heap_stats.huge_size != state->huge_size) {
- HDfprintf(stdout, "heap_stats.huge_size = %Hu, state->huge_size = %Hu\n", heap_stats.huge_size, state->huge_size);
+ HDfprintf(stdout, "heap_stats.huge_size = %" PRIuHSIZE ", state->huge_size = %" PRIuHSIZE "\n", heap_stats.huge_size, state->huge_size);
TEST_ERROR
} /* end if */
if(heap_stats.tiny_nobjs != state->tiny_nobjs) {
- HDfprintf(stdout, "heap_stats.tiny_nobjs = %Hu, state->tiny_nobjs = %Zu\n", heap_stats.tiny_nobjs, state->tiny_nobjs);
+ HDfprintf(stdout, "heap_stats.tiny_nobjs = %" PRIuHSIZE ", state->tiny_nobjs = %zu\n", heap_stats.tiny_nobjs, state->tiny_nobjs);
TEST_ERROR
} /* end if */
if(heap_stats.tiny_size != state->tiny_size) {
- HDfprintf(stdout, "heap_stats.tiny_size = %Hu, state->tiny_size = %Hu\n", heap_stats.tiny_size, state->tiny_size);
+ HDfprintf(stdout, "heap_stats.tiny_size = %" PRIuHSIZE ", state->tiny_size = %" PRIuHSIZE "\n", heap_stats.tiny_size, state->tiny_size);
TEST_ERROR
} /* end if */
diff --git a/test/fillval.c b/test/fillval.c
index 3fbbbbb..5ea296d 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -805,7 +805,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
if(fill_time!=H5D_FILL_TIME_NEVER && val_rd!=fillval) {
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout," Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %u, "
+ HDfprintf(stdout," Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE "}, read: %u, "
"Fill value: %u\n",
hs_offset[0], hs_offset[1],
hs_offset[2], hs_offset[3],
@@ -822,7 +822,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
rd_c.z != fill_c.z)) {
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout," Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %f, %d, %f, %c"
+ HDfprintf(stdout," Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE "}, read: %f, %d, %f, %c"
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1],
hs_offset[2], hs_offset[3],
@@ -862,7 +862,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
if(buf[u] != fillval) {
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout," Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %u, "
+ HDfprintf(stdout," Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "}, read: %u, "
"Fill value: %u\n",
hs_offset[0], hs_offset[1],
hs_offset[2], hs_offset[3],
@@ -889,7 +889,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
!H5_DBL_ABS_EQUAL(buf_c[u].y, fill_c.y) || buf_c[u].z != fill_c.z) {
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
- HDfprintf(stdout," Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %f, %d, %f, %c"
+ HDfprintf(stdout," Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "}, read: %f, %d, %f, %c"
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1],
hs_offset[2], hs_offset[3],
@@ -1284,7 +1284,7 @@ test_extend_verify_integer(unsigned lineno, const hsize_t *offset,
/* Verify value */
if(*test_val != *compare_val) {
HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
- HDfprintf(stdout," Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: %d, "
+ HDfprintf(stdout," Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "}, read: %d, "
"expected: %d\n",
offset[0], offset[1],
offset[2], offset[3],
@@ -1380,7 +1380,7 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset,
HDstrcmp(test_val->b, compare_val->b) ||
(test_val->y != compare_val->y)) {
HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
- HDfprintf(stdout," Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: {%d, '%s', '%s', %d} "
+ HDfprintf(stdout," Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "}, read: {%d, '%s', '%s', %d} "
"expected: {%d, '%s', '%s', %d}\n",
offset[0], offset[1], offset[2], offset[3], offset[4],
test_val->x, test_val->a, test_val->b, test_val->y,
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 9897c84..529a440 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -1069,7 +1069,7 @@ test_path_api_calls(void)
/* Get the path */
if ((path_len = H5PLget(0, path, 256)) <= 0) {
- HDfprintf(stderr," get 0 len: %u : %s\n", path_len, path);
+ HDfprintf(stderr," get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
if (HDstrcmp(path, "a_path_0") != 0) {
diff --git a/test/freespace.c b/test/freespace.c
index 124ae3e..fb2b45d 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -411,22 +411,22 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state)
FAIL_STACK_ERROR
if(frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n",
+ HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
frspace_stats.tot_space, state->tot_space);
TEST_ERROR
} /* end if */
if(frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n",
+ HDfprintf(stdout, "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR
} /* end if */
if(frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n",
+ HDfprintf(stdout, "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE "\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR
} /* end if */
if(frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n",
+ HDfprintf(stdout, "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE "\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR
} /* end if */
diff --git a/test/h5test.c b/test/h5test.c
index 277e77b..d72a4c5 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -2088,7 +2088,7 @@ h5_compare_file_bytes(char *f1name, char *f2name)
f2size = HDftell(f2ptr);
if (f1size != f2size) {
- HDfprintf(stderr, "Files differ in size, %llu vs. %llu\n", f1size, f2size);
+ HDfprintf(stderr, "Files differ in size, %" PRIuHSIZE " vs. %" PRIuHSIZE "\n", f1size, f2size);
ret_value = -1;
goto done;
}
@@ -2106,7 +2106,7 @@ h5_compare_file_bytes(char *f1name, char *f2name)
goto done;
}
if (f1char != f2char) {
- HDfprintf(stderr, "Mismatch @ 0x%llX: 0x%X != 0x%X\n", ii, f1char, f2char);
+ HDfprintf(stderr, "Mismatch @ 0x%" PRIXHSIZE ": 0x%X != 0x%X\n", ii, f1char, f2char);
ret_value = -1;
goto done;
}
diff --git a/test/hdfs.c b/test/hdfs.c
index 0f4969e..31efa08 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -234,9 +234,10 @@ if (!(condition)) { \
*----------------------------------------------------------------------------
*/
#define JSERR_STR(expected, actual, reason) { \
+ const char *_reason = reason; \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
+ if (_reason != NULL) { \
+ HDprintf("%s\n", _reason); \
} else { \
HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", \
(expected), (actual)); \
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 8168eed..27b31cf 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -1154,7 +1154,7 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
/* Check computed coordinates */
for(v = 0; v < ARRAY_OFFSET_NDIMS; v++)
if(coords[v] != new_coords[v]) {
- HDfprintf(stderr,"coords[%u]=%Hu, new_coords[%u]=%Hu\n", (unsigned)v, coords[v], (unsigned)v, new_coords[v]);
+ HDfprintf(stderr,"coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v, coords[v], v, new_coords[v]);
TEST_ERROR;
} /* end if */
} /* end for */
diff --git a/test/mf.c b/test/mf.c
index 8e2f75c..e8e8fc7 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -171,22 +171,22 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state)
FAIL_STACK_ERROR
if(frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n",
+ HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
frspace_stats.tot_space, state->tot_space);
TEST_ERROR
} /* end if */
if(frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n",
+ HDfprintf(stdout, "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR
} /* end if */
if(frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n",
+ HDfprintf(stdout, "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE "\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR
} /* end if */
if(frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n",
+ HDfprintf(stdout, "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE "\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR
} /* end if */
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index 35c3f90..5aeb299 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -2459,7 +2459,8 @@ test_vanishing_datasets(void)
TEST_ERROR;
}
if (group_info.nlinks > 0) {
- HDfprintf(stderr, "links in rw file: %d\n", group_info.nlinks);
+ HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n",
+ group_info.nlinks);
HDfflush(stderr);
TEST_ERROR;
}
@@ -2474,7 +2475,8 @@ test_vanishing_datasets(void)
TEST_ERROR;
}
if (group_info.nlinks > 0) {
- HDfprintf(stderr, "links in wo file: %d\n", group_info.nlinks);
+ HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n",
+ group_info.nlinks);
HDfflush(stderr);
TEST_ERROR;
}
diff --git a/test/ros3.c b/test/ros3.c
index fb7aa2b..732aadb 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -197,14 +197,19 @@ if (!(condition)) { \
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ } else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) { \
JSFAILED_AT() \
- if (reason!= NULL) { \
- HDprintf("%s\n", (reason)); \
- } else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", \
- (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), (reason)); \
}
@@ -236,18 +241,21 @@ if (!(condition)) { \
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ } else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) { \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", \
- (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
-
-
#ifdef JSVERIFY_EXP_ACT
@@ -1594,7 +1602,8 @@ test_cmp(void)
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF( 0 > fapl_id )
- JSVERIFY( SUCCEED, H5Pset_fapl_ros3(fapl_id, &restricted_access_fa), NULL )
+ JSVERIFY( SUCCEED, H5Pset_fapl_ros3(fapl_id, &restricted_access_fa),
+ NULL )
fd_raven = H5FDopen(
url_text_public,
diff --git a/test/s3comms.c b/test/s3comms.c
index 9a7d7d6..ef48d7a 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -185,14 +185,19 @@ if (!(condition)) { \
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ } else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) { \
JSFAILED_AT() \
- if (reason!= NULL) { \
- HDprintf("%s\n", (reason)); \
- } else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", \
- (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), reason);\
}
@@ -224,14 +229,19 @@ if (!(condition)) { \
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ } else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) { \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", \
- (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
#ifdef JSVERIFY_EXP_ACT
@@ -2260,7 +2270,7 @@ test_signing_key(void)
strncmp((const char *)cases[i].exp,
(const char *)key,
SHA256_DIGEST_LENGTH),
- cases[i].exp )
+ (const char *)cases[i].exp )
free(key);
key = NULL;
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 54ea546..d44c7c7 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -585,7 +585,8 @@ static int MpioTest2G( MPI_Comm comm )
MPI_Comm_rank(comm, &mpi_rank);
if(mpi_rank == 0) {
- HDprintf("Using %d process on dataset shape [%llu, %llu, %llu]\n",
+ HDprintf("Using %d process on dataset shape "
+ "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n",
mpi_size, shape[0], shape[1], shape[2]);
}
@@ -613,7 +614,7 @@ static int MpioTest2G( MPI_Comm comm )
tot_size_bytes *= shape[i];
}
if(mpi_rank == 0) {
- HDprintf("Dataset of %llu bytes\n", tot_size_bytes);
+ HDprintf("Dataset of %zu bytes\n", tot_size_bytes);
}
filespace = H5Screate_simple(3, shape, NULL);
VRFY((filespace >= 0), "H5Screate_simple succeeded");
@@ -691,7 +692,7 @@ static int MpioTest2G( MPI_Comm comm )
H5Fclose(file_id);
free(data);
- HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank, data_size_bytes);
+ HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank);
if (mpi_rank == 0)
HDremove(FILENAME[1]);
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index f86852a..22a924d 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -143,10 +143,14 @@ void point_set(hsize_t start[],
}
if(VERBOSE_MED) {
- HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ HDprintf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "total datapoints=%" PRIuHSIZE "\n",
+ start[0], start[1], count[0], count[1],
+ stride[0], stride[1], block[0], block[1],
+ block[0] * block[1] * count[0] * count[1]);
k = 0;
for(i = 0; i < num_points ; i++) {
HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
@@ -167,15 +171,15 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE * dataset)
/* print the column heading */
HDprintf("%-8s", "Cols:");
for (j=0; j < block[1]; j++){
- HDprintf("%3lu ", (unsigned long)(start[1]+j));
+ HDprintf("%3" PRIuHSIZE " ", start[1] + j);
}
HDprintf("\n");
/* print the slab data */
for (i=0; i < block[0]; i++){
- HDprintf("Row %2lu: ", (unsigned long)(i+start[0]));
+ HDprintf("Row %2" PRIuHSIZE ": ", i + start[0]);
for (j=0; j < block[1]; j++){
- HDprintf("%llu ", *dataptr++);
+ HDprintf("%" PRIuHSIZE " ", *dataptr++);
}
HDprintf("\n");
}
@@ -194,9 +198,12 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
/* print it if VERBOSE_MED */
if(VERBOSE_MED) {
HDprintf("verify_data dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
- (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
+ HDprintf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "count(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), "
+ "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n",
+ start[0], start[1], count[0], count[1],
+ stride[0], stride[1], block[0], block[1]);
HDprintf("original values:\n");
dataset_print(start, block, original);
HDprintf("compared values:\n");
@@ -208,9 +215,11 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[],
for (j=0; j < block[1]; j++){
if(*dataset != *original){
if(vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %llu, got %llu\n",
- (unsigned long)i, (unsigned long)j,
- (unsigned long)(i+start[0]), (unsigned long)(j+start[1]),
+ HDprintf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]"
+ "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): "
+ "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n",
+ i, j,
+ i + start[0], j + start[1],
*(original), *(dataset));
}
dataset++;
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 954071d..8315c5b 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -1361,7 +1361,7 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%ld).\n",
+ HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n",
world_mpi_rank, FUNC,
actual_total_reads, total_reads);
}
@@ -1372,7 +1372,7 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%ld).\n",
+ HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n",
world_mpi_rank, FUNC,
actual_total_writes, total_writes);
}
@@ -1586,8 +1586,9 @@ serve_read_request(struct mssg_t * mssg_ptr)
nerrors++;
success = FALSE;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, FUNC, target_addr);
+ HDfprintf(stdout,
+ "%d:%s: addr lookup failed for %" PRIuHADDR ".\n",
+ world_mpi_rank, FUNC, target_addr);
}
} else if ( data[target_index].len != mssg_ptr->len ) {
@@ -1595,7 +1596,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: data[i].len = %Zu != mssg->len = %d.\n",
+ "%d:%s: data[i].len = %zu != mssg->len = %d.\n",
world_mpi_rank, FUNC,
data[target_index].len, mssg_ptr->len);
}
@@ -1605,7 +1606,8 @@ serve_read_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n",
+ "%d:%s: proc %d read invalid entry. "
+ "idx/base_addr = %d/%" PRIuHADDR ".\n",
world_mpi_rank, FUNC,
mssg_ptr->src,
target_index,
@@ -1790,8 +1792,9 @@ serve_write_request(struct mssg_t * mssg_ptr)
nerrors++;
success = FALSE;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, FUNC, target_addr);
+ HDfprintf(stdout,
+ "%d:%s: addr lookup failed for %" PRIuHADDR ".\n",
+ world_mpi_rank, FUNC, target_addr);
}
} else if ( data[target_index].len != mssg_ptr->len ) {
@@ -1799,7 +1802,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: data[i].len = %Zu != mssg->len = %d.\n",
+ "%d:%s: data[i].len = %zu != mssg->len = %d.\n",
world_mpi_rank, FUNC,
data[target_index].len, mssg_ptr->len);
}
@@ -1940,13 +1943,13 @@ serve_total_writes_request(struct mssg_t * mssg_ptr)
if ( success ) {
- HDfprintf(stdout, "%d request total writes %ld.\n",
+ HDfprintf(stdout, "%d request total writes %d.\n",
(int)(mssg_ptr->src),
total_writes);
} else {
- HDfprintf(stdout, "%d request total writes %ld -- FAILED.\n",
+ HDfprintf(stdout, "%d request total writes %d -- FAILED.\n",
(int)(mssg_ptr->src),
total_writes);
@@ -2019,13 +2022,13 @@ serve_total_reads_request(struct mssg_t * mssg_ptr)
if ( success ) {
- HDfprintf(stdout, "%d request total reads %ld.\n",
+ HDfprintf(stdout, "%d request total reads %d.\n",
(int)(mssg_ptr->src),
total_reads);
} else {
- HDfprintf(stdout, "%d request total reads %ld -- FAILED.\n",
+ HDfprintf(stdout, "%d request total reads %d -- FAILED.\n",
(int)(mssg_ptr->src),
total_reads);
@@ -2087,8 +2090,9 @@ serve_entry_writes_request(struct mssg_t * mssg_ptr)
nerrors++;
success = FALSE;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, FUNC, target_addr);
+ HDfprintf(stdout,
+ "%d:%s: addr lookup failed for %" PRIuHADDR ".\n",
+ world_mpi_rank, FUNC, target_addr);
}
} else {
@@ -2184,8 +2188,9 @@ serve_entry_reads_request(struct mssg_t * mssg_ptr)
nerrors++;
success = FALSE;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, FUNC, target_addr);
+ HDfprintf(stdout,
+ "%d:%s: addr lookup failed for %" PRIuHADDR ".\n",
+ world_mpi_rank, FUNC, target_addr);
}
} else {
@@ -2708,10 +2713,10 @@ datum_notify(H5C_notify_action_t action, void *thing)
HDfprintf(stdout,
"%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
world_mpi_rank, FUNC);
- HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n",
+ HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n",
world_mpi_rank, FUNC, mssg.base_addr);
HDfprintf(stdout,
- "%d:%s: entry_ptr->base_addr = %a.\n",
+ "%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n",
world_mpi_rank, FUNC,
entry_ptr->base_addr);
}
@@ -2721,7 +2726,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
HDfprintf(stdout,
"%d:%s: mssg.len != entry_ptr->len.\n",
world_mpi_rank, FUNC);
- HDfprintf(stdout, "%d:%s: mssg.len = %a.\n",
+ HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n",
world_mpi_rank, FUNC, mssg.len);
}
@@ -4679,8 +4684,9 @@ verify_entry_reads(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: rep/exp entry 0x%llx reads mismatch (%ld/%ld).\n",
- world_mpi_rank, FUNC, (long long)addr,
+ "%d:%s: rep/exp entry 0x%" PRIxHADDR
+ " reads mismatch (%d/%d).\n",
+ world_mpi_rank, FUNC, addr,
reported_entry_reads, expected_entry_reads);
}
}
@@ -4786,7 +4792,7 @@ verify_entry_writes(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: rep/exp entry 0x%llx writes mismatch (%ld/%ld).\n",
+ "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n",
world_mpi_rank, FUNC, (long long)addr,
reported_entry_writes, expected_entry_writes);
}
@@ -4886,7 +4892,7 @@ verify_total_reads(int expected_total_reads)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: reported/expected total reads mismatch (%ld/%ld).\n",
+ "%d:%s: reported/expected total reads mismatch (%ld/%d).\n",
world_mpi_rank, FUNC,
reported_total_reads, expected_total_reads);
@@ -7094,12 +7100,12 @@ trace_file_check(int metadata_write_strategy)
if(verbose) {
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, FUNC, i);
if(expected_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, "<EMPTY>", expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer, actual_line_len);
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, "<EMPTY>", expected_line_len);
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer, actual_line_len);
}
if(actual_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, "<EMPTY>", actual_line_len);
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len);
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, "<EMPTY>", actual_line_len);
}
}
HDfprintf(stdout, "BADNESS BADNESS BADNESS\n");
@@ -7112,8 +7118,8 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if(verbose) {
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, FUNC, i);
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer, actual_line_len);
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len);
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer, actual_line_len);
}
}
}
diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c
index 14e3d10..6877d63 100644
--- a/testpar/t_cache_image.c
+++ b/testpar/t_cache_image.c
@@ -3340,8 +3340,10 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
H5_FAILED();
- if ( show_progress )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg);
+ if ( show_progress ) {
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name,
+ failure_mssg);
+ }
}
}
@@ -3638,8 +3640,10 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
H5_FAILED();
- if ( show_progress )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg);
+ if ( show_progress ) {
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name,
+ failure_mssg);
+ }
}
}
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index 76f9276..13f408d 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -259,7 +259,7 @@ test_write_one_chunk_filtered_dataset(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -417,7 +417,7 @@ test_write_filtered_dataset_no_overlap(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -578,7 +578,7 @@ test_write_filtered_dataset_overlap(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -745,7 +745,7 @@ test_write_filtered_dataset_single_no_selection(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -1196,7 +1196,7 @@ test_write_filtered_dataset_interleaved_write(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -1368,7 +1368,7 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(void)
start[2] = (hsize_t) mpi_rank;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ %llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]);
HDfflush(stdout);
}
@@ -1531,7 +1531,7 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(void)
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ %llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]);
HDfflush(stdout);
}
@@ -1697,7 +1697,7 @@ test_write_3d_filtered_dataset_overlap(void)
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ %llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]);
HDfflush(stdout);
}
@@ -1875,7 +1875,7 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(void)
start[1] = ((hsize_t) mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -2058,7 +2058,7 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -2260,7 +2260,7 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(void)
start[1] = ((hsize_t) mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -2446,7 +2446,7 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -2655,7 +2655,7 @@ test_read_one_chunk_filtered_dataset(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -2854,7 +2854,7 @@ test_read_filtered_dataset_no_overlap(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -3055,7 +3055,7 @@ test_read_filtered_dataset_overlap(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -3280,7 +3280,7 @@ test_read_filtered_dataset_single_no_selection(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -3844,7 +3844,7 @@ test_read_filtered_dataset_interleaved_read(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -4063,7 +4063,7 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(void)
start[2] = (hsize_t) mpi_rank;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -4275,7 +4275,7 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(void)
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -4492,7 +4492,7 @@ test_read_3d_filtered_dataset_overlap(void)
start[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -4723,7 +4723,7 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(void)
start[1] = ((hsize_t) mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -4949,7 +4949,7 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -5183,7 +5183,7 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(void)
start[1] = ((hsize_t) mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS);
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -5421,7 +5421,7 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
@@ -5717,7 +5717,7 @@ test_write_parallel_read_serial(void)
offset[2] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], offset[ %llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], offset[1], offset[2], block[0], block[1], block[2]);
HDfflush(stdout);
}
@@ -5889,7 +5889,7 @@ test_shrinking_growing_chunks(void)
start[1] = 0;
if (VERBOSE_MED) {
- HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], block size[ %llu, %llu ]\n",
+ HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE " ]\n",
mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]);
HDfflush(stdout);
}
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index 34fcc72..c34ea8d 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -2317,7 +2317,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
}
if ( ( MAINPROCESS ) && ( tests_skipped > 0 ) ) {
- HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n",
+ HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
tests_skipped, total_tests);
}
@@ -4548,7 +4548,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
} /* end of switch(sstest_type) */
#if CONTIG_HS_DR_PIO_TEST__DEBUG
if ( ( MAINPROCESS ) && ( tests_skipped > 0 ) ) {
- HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n",
+ HDfprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n",
tests_run, tests_skipped, total_tests);
}
#endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */
@@ -4556,7 +4556,7 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type)
}
if ( ( MAINPROCESS ) && ( tests_skipped > 0 ) ) {
- HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n",
+ HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n",
tests_skipped, total_tests);
}
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index 59b11d6..6bfab30 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -323,9 +323,9 @@ get_class(H5T_class_t tclass)
void print_found(hsize_t nfound)
{
if(g_Parallel)
- parallel_print("%"H5_PRINTF_LL_WIDTH"u differences found\n", (unsigned long long)nfound);
+ parallel_print("%" PRIuHSIZE " differences found\n", nfound);
else
- HDfprintf(stdout,"%Hu differences found\n",nfound);
+ HDfprintf(stdout,"%" PRIuHSIZE " differences found\n",nfound);
}
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index b1be577..4ba89fa 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -81,7 +81,7 @@ h5tool_format_t h5tools_dataformat = {
1, /*skip_first */
1, /*obj_hidefileno */
- " "H5_PRINTF_HADDR_FMT, /*obj_format */
+ " %" PRIuHADDR, /*obj_format */
1, /*dset_hidefileno */
"DATASET %s ", /*dset_format */
@@ -3292,7 +3292,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
if (HADDR_UNDEF == ioffset)
h5tools_str_append(&buffer, "OFFSET HADDR_UNDEF");
else
- h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
+ h5tools_str_append(&buffer, "OFFSET %" PRIuHADDR, ioffset);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
}
}
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index b50ce52..ce3643c 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -1233,9 +1233,9 @@ dump_fcpl(hid_t fid)
indentation(dump_indent + COL);
PRINTSTREAM(rawoutstream, "%s %s\n","FREE_SPACE_PERSIST", fs_persist ? "TRUE" : "FALSE");
indentation(dump_indent + COL);
- PRINTSTREAM(rawoutstream, "%s %Hu\n","FREE_SPACE_SECTION_THRESHOLD", fs_threshold);
+ PRINTSTREAM(rawoutstream, "%s %" PRIuHSIZE "\n","FREE_SPACE_SECTION_THRESHOLD", fs_threshold);
indentation(dump_indent + COL);
- PRINTSTREAM(rawoutstream, "%s %Hu\n","FILE_SPACE_PAGE_SIZE", fsp_size);
+ PRINTSTREAM(rawoutstream, "%s %" PRIuHSIZE "\n","FILE_SPACE_PAGE_SIZE", fsp_size);
/*-------------------------------------------------------------------------
* USER_BLOCK
@@ -1244,7 +1244,7 @@ dump_fcpl(hid_t fid)
indentation(dump_indent + COL);
PRINTSTREAM(rawoutstream, "USER_BLOCK %s\n",BEGIN);
indentation(dump_indent + COL + COL);
- PRINTSTREAM(rawoutstream,"%s %Hu\n","USERBLOCK_SIZE", userblock);
+ PRINTSTREAM(rawoutstream,"%s %" PRIuHSIZE "\n","USERBLOCK_SIZE", userblock);
indentation(dump_indent + COL);
PRINTSTREAM(rawoutstream, "%s\n",END);
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index bb47f77..696841d 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -93,7 +93,7 @@ static h5tool_format_t xml_dataformat = {
1, /*skip_first */
1, /*obj_hidefileno */
- " "H5_PRINTF_HADDR_FMT, /*obj_format */
+ " %" PRIuHADDR, /*obj_format */
1, /*dset_hidefileno */
"DATASET %s ", /*dset_format */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 8cf9b3c..0a641eb 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -96,7 +96,7 @@ static h5tool_format_t ls_dataformat = {
0, /*skip_first */
0, /*obj_hidefileno */
- "-%lu:"H5_PRINTF_HADDR_FMT, /*obj_format */
+ "-%lu:%" PRIuHADDR, /*obj_format */
0, /*dset_hidefileno */
"DSET-%s ", /*dset_format */
@@ -954,7 +954,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
*strangely, unless use another pointer "copy".*/
copy = value + i * dst_size;
- h5tools_str_append(buffer, "%"H5_PRINTF_LL_WIDTH"d", *((long long*)((void*)copy)));
+ h5tools_str_append(buffer, "%lld", *((long long*)((void*)copy)));
}
}
@@ -1896,7 +1896,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
print_string(&buffer, f_name, TRUE);
}
else {
- h5tools_str_append(&buffer, " #%03d %10"H5_PRINTF_LL_WIDTH"u %10"H5_PRINTF_LL_WIDTH"u %10"H5_PRINTF_LL_WIDTH"u ",
+ h5tools_str_append(&buffer, " #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10" PRIuHSIZE " ",
i, total, (hsize_t)f_offset, f_size);
print_string(&buffer, f_name, TRUE);
}
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index b2cb02b..4fd163c 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -711,7 +711,7 @@ check_options(pack_opt_t *options)
}
if (options->ublock_filename == NULL && options->ublock_size != 0)
- H5TOOLS_GOTO_ERROR((-1), "file name missing for user block", options->ublock_filename);
+ H5TOOLS_GOTO_ERROR((-1), "file name missing for user block");
/*------------------------------------------------------------------------
* Verify alignment options; threshold is zero default but alignment not
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index ec4b5ab..93b7242 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1208,7 +1208,7 @@ print_file_info(const iter_t *iter)
HDprintf("\t# of unique links: %lu\n", iter->uniq_links);
HDprintf("\t# of unique other: %lu\n", iter->uniq_others);
HDprintf("\tMax. # of links to object: %lu\n", iter->max_links);
- HDfprintf(stdout, "\tMax. # of objects in group: %Hu\n", iter->max_fanout);
+ HDfprintf(stdout, "\tMax. # of objects in group: %" PRIuHSIZE "\n", iter->max_fanout);
return 0;
} /* print_file_info() */
@@ -1232,40 +1232,40 @@ static herr_t
print_file_metadata(const iter_t *iter)
{
HDfprintf(stdout, "File space information for file metadata (in bytes):\n");
- HDfprintf(stdout, "\tSuperblock: %Hu\n", iter->super_size);
- HDfprintf(stdout, "\tSuperblock extension: %Hu\n", iter->super_ext_size);
- HDfprintf(stdout, "\tUser block: %Hu\n", iter->ublk_size);
+ HDfprintf(stdout, "\tSuperblock: %" PRIuHSIZE "\n", iter->super_size);
+ HDfprintf(stdout, "\tSuperblock extension: %" PRIuHSIZE "\n", iter->super_ext_size);
+ HDfprintf(stdout, "\tUser block: %" PRIuHSIZE "\n", iter->ublk_size);
HDfprintf(stdout, "\tObject headers: (total/unused)\n");
- HDfprintf(stdout, "\t\tGroups: %Hu/%Hu\n", iter->group_ohdr_info.total_size,
+ HDfprintf(stdout, "\t\tGroups: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->group_ohdr_info.total_size,
iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatasets(exclude compact data): %Hu/%Hu\n",
+ HDfprintf(stdout, "\t\tDatasets(exclude compact data): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatatypes: %Hu/%Hu\n", iter->dtype_ohdr_info.total_size,
+ HDfprintf(stdout, "\t\tDatatypes: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->dtype_ohdr_info.total_size,
iter->dtype_ohdr_info.free_size);
HDfprintf(stdout, "\tGroups:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->groups_heap_storage_size);
+ HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
HDfprintf(stdout, "\tAttributes:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->attrs_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->attrs_heap_storage_size);
+ HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->attrs_btree_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->attrs_heap_storage_size);
HDfprintf(stdout, "\tChunked datasets:\n");
- HDfprintf(stdout, "\t\tIndex: %Hu\n", iter->datasets_index_storage_size);
+ HDfprintf(stdout, "\t\tIndex: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
HDfprintf(stdout, "\tDatasets:\n");
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->datasets_heap_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
HDfprintf(stdout, "\tShared Messages:\n");
- HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->SM_hdr_storage_size);
- HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->SM_index_storage_size);
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->SM_heap_storage_size);
+ HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->SM_hdr_storage_size);
+ HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->SM_index_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->SM_heap_storage_size);
HDfprintf(stdout, "\tFree-space managers:\n");
- HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->free_hdr);
- HDfprintf(stdout, "\t\tAmount of free space: %Hu\n", iter->free_space);
+ HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->free_hdr);
+ HDfprintf(stdout, "\t\tAmount of free space: %" PRIuHSIZE "\n", iter->free_space);
return 0;
} /* print_file_metadata() */
@@ -1345,11 +1345,11 @@ print_group_metadata(const iter_t *iter)
{
HDprintf("File space information for groups' metadata (in bytes):\n");
- HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n",
+ HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\tB-tree/List: %Hu\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\tHeap: %Hu\n", iter->groups_heap_storage_size);
+ HDfprintf(stdout, "\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
+ HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
return 0;
} /* print_group_metadata() */
@@ -1384,7 +1384,7 @@ print_dataset_info(const iter_t *iter)
HDprintf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
HDprintf("1-D Dataset information:\n");
- HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %Hu\n", iter->max_dset_dims);
+ HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %" PRIuHSIZE "\n", iter->max_dset_dims);
HDprintf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
total = 0;
for(u = 0; u < (unsigned)sdsets_threshold; u++) {
@@ -1417,8 +1417,8 @@ print_dataset_info(const iter_t *iter)
} /* end if */
HDprintf("Dataset storage information:\n");
- HDfprintf(stdout, "\tTotal raw data size: %Hu\n", iter->dset_storage_size);
- HDfprintf(stdout, "\tTotal external raw data size: %Hu\n", iter->dset_external_storage_size);
+ HDfprintf(stdout, "\tTotal raw data size: %" PRIuHSIZE "\n", iter->dset_storage_size);
+ HDfprintf(stdout, "\tTotal external raw data size: %" PRIuHSIZE "\n", iter->dset_external_storage_size);
HDprintf("Dataset layout information:\n");
for(u = 0; u < H5D_NLAYOUTS; u++)
@@ -1460,12 +1460,12 @@ print_dset_metadata(const iter_t *iter)
{
HDprintf("File space information for datasets' metadata (in bytes):\n");
- HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n",
+ HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\tIndex for Chunked datasets: %Hu\n",
+ HDfprintf(stdout, "\tIndex for Chunked datasets: %" PRIuHSIZE "\n",
iter->datasets_index_storage_size);
- HDfprintf(stdout, "\tHeap: %Hu\n", iter->datasets_heap_storage_size);
+ HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
return 0;
} /* print_dset_metadata() */
@@ -1582,7 +1582,7 @@ print_freespace_info(const iter_t *iter)
unsigned u; /* Local index variable */
HDfprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
- HDfprintf(stdout, "Free-space section threshold: %Hu bytes\n", iter->fs_threshold);
+ HDfprintf(stdout, "Free-space section threshold: %" PRIuHSIZE " bytes\n", iter->fs_threshold);
HDprintf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
total = 0;
for(u = 0; u < SIZE_SMALL_SECTS; u++) {
@@ -1632,7 +1632,7 @@ print_storage_summary(const iter_t *iter)
double percent = 0.0f;
HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
- HDfprintf(stdout, "File space page size: %Hu bytes\n", iter->fsp_size);
+ HDfprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size);
HDprintf("Summary of file space information:\n");
total_meta =
iter->super_size + iter->super_ext_size + iter->ublk_size +
@@ -1650,26 +1650,26 @@ print_storage_summary(const iter_t *iter)
iter->SM_heap_storage_size +
iter->free_hdr;
- HDfprintf(stdout, " File metadata: %Hu bytes\n", total_meta);
- HDfprintf(stdout, " Raw data: %Hu bytes\n", iter->dset_storage_size);
+ HDfprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta);
+ HDfprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size);
percent = ((double)iter->free_space / (double)iter->filesize) * (double)100.0f;
- HDfprintf(stdout, " Amount/Percent of tracked free space: %Hu bytes/%3.1f%\n",
+ HDfprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n",
iter->free_space, percent);
if(iter->filesize < (total_meta + iter->dset_storage_size + iter->free_space)) {
unaccount = (total_meta + iter->dset_storage_size + iter->free_space) - iter->filesize;
- HDfprintf(stdout, " ??? File has %Hu more bytes accounted for than its size! ???\n", unaccount);
+ HDfprintf(stdout, " ??? File has %" PRIuHSIZE " more bytes accounted for than its size! ???\n", unaccount);
}
else {
unaccount = iter->filesize - (total_meta + iter->dset_storage_size + iter->free_space);
- HDfprintf(stdout, " Unaccounted space: %Hu bytes\n", unaccount);
+ HDfprintf(stdout, " Unaccounted space: %" PRIuHSIZE " bytes\n", unaccount);
}
- HDfprintf(stdout, "Total space: %Hu bytes\n", total_meta + iter->dset_storage_size + iter->free_space + unaccount);
+ HDfprintf(stdout, "Total space: %" PRIuHSIZE " bytes\n", total_meta + iter->dset_storage_size + iter->free_space + unaccount);
if(iter->nexternal)
- HDfprintf(stdout, "External raw data: %Hu bytes\n", iter->dset_external_storage_size);
+ HDfprintf(stdout, "External raw data: %" PRIuHSIZE " bytes\n", iter->dset_external_storage_size);
return 0;
} /* print_storage_summary() */
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 96cbf9c..3bd570a 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -361,7 +361,7 @@ main (int argc, const char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- HDfprintf(stdout, "EOA is %a; EOF is %a \n", eoa, st.st_size);
+ HDfprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, st.st_size);
}
/* --increment option */
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index 7242ed3..6fa8b5f 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -350,7 +350,7 @@ main(int argc, char *argv[])
/*
* Read the signature at the specified file position.
*/
- HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr);
+ HDfprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr);
if(H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), sig) < 0) {
HDfprintf(stderr, "cannot read signature\n");
exit_value = 3;
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 18e6d86..a95a22e 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -689,7 +689,7 @@ DIFFFAIL()
$RUNSERIAL $H5DIFF_BIN -q "$@"
)
RET=$?
- if [ $RET == 0 ] ; then
+ if [ $RET -eq 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index d7c56af..d8af390 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -258,9 +258,9 @@ static int check_partial_chunks_perf(hid_t file)
end_t = H5_get_time();
if((end_t - start_t) > (double)0.0f)
- printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
+ printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n", (end_t -start_t), nbytes_global);
else
- printf("1. Partial chunks: no total read time because timer is not available; number of bytes being read from file is %lu\n", nbytes_global);
+ printf("1. Partial chunks: no total read time because timer is not available; number of bytes being read from file is %zu\n", nbytes_global);
H5Dclose (dataset);
H5Sclose (filespace);
@@ -332,9 +332,9 @@ static int check_hash_value_perf(hid_t file)
end_t = H5_get_time();
if((end_t - start_t) > (double)0.0f)
- printf("2. Hash value: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
+ printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n", (end_t -start_t), nbytes_global);
else
- printf("2. Hash value: no total read time because timer is not available; number of bytes being read from file is %lu\n", nbytes_global);
+ printf("2. Hash value: no total read time because timer is not available; number of bytes being read from file is %zu\n", nbytes_global);
H5Dclose (dataset);
H5Sclose (filespace);
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index 364836f..5b78c52 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -317,7 +317,7 @@ int main(int argc, char **argv)
VRFY((ret >= 0), "H5Dwrite dataset1 succeeded", !H5FATAL);
- if (ret < 0) HDfprintf(stderr, "node %d, read error, loc = %Ld: %s\n",
+ if (ret < 0) HDfprintf(stderr, "node %d, read error, loc = %" PRId64 ": %s\n",
mynod, mynod*opt_block, strerror(myerrno));
/* if the user wanted to check correctness, compare the write
@@ -440,7 +440,7 @@ parse_args(int argc, char **argv)
opt_threshold = (hsize_t)HDatoi(p + 1);
}
HDfprintf(stdout,
- "alignment/threshold=%Hu/%Hu\n",
+ "alignment/threshold=%" PRIuHSIZE "/%" PRIuHSIZE "\n",
opt_alignment, opt_threshold);
break;
case '2': /* use 2-files, i.e., split file driver */
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 19b450f..2e61e74 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -785,7 +785,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Allocate data verification buffer */
if(NULL == (buffer2 = (char *)malloc(linear_buf_size))) {
- HDfprintf(stderr, "malloc for data verification buffer size (%Zu) failed\n", linear_buf_size);
+ HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
} /* end if */
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index d2eb3fc..0656e94 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -867,9 +867,9 @@ report_parameters(struct options *opts)
HDfprintf(output, "\n");
if(opts->page_size) {
- HDfprintf(output, "Page Aggregation Enabled. Page size = %ld\n", opts->page_size);
+ HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
if(opts->page_buffer_size)
- HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %ld\n", opts->page_buffer_size);
+ HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
else
HDfprintf(output, "Page Buffering Disabled\n");
}
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 99e13bc..74a6245 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -151,7 +151,7 @@
#define HDfopen(S,M) fopen(S,M)
#define HDfork() fork()
#define HDfpathconf(F,N) fpathconf(F,N)
-H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
+#define HDfprintf fprintf
#define HDfputc(C,F) fputc(C,F)
#define HDfputs(S,F) fputs(S,F)
#define HDfread(M,Z,N,F) fread(M,Z,N,F)