summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-27 19:58:43 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-07-07 15:49:55 (GMT)
commit307cb5da4863b3d29fc5d1b97bc01034fc5161dd (patch)
tree96b5af3113c27f46fc24a929ac074dda752b5283 /test
parentd52b27ad1d8142945a92310b79ab79171e76a3c3 (diff)
downloadhdf5-307cb5da4863b3d29fc5d1b97bc01034fc5161dd.zip
hdf5-307cb5da4863b3d29fc5d1b97bc01034fc5161dd.tar.gz
hdf5-307cb5da4863b3d29fc5d1b97bc01034fc5161dd.tar.bz2
Squash my changes on branch `fprintf-experiment` into one commit for
reapplication to my new warnings branch, `warnings-again`. These changes are included: commit 915551b7bf64e777dd2007386ec77b1d117770da Merge: 63858c2 a8892bb Author: David Young <dyoung@hdfgroup.org> Date: Mon Nov 25 17:39:49 2019 -0600 Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment commit a8892bb42d6f6e4fbc30fae0eb2b957f81c938b9 Merge: 5c911d8 f907b51 Author: David Young <dyoung@hdfgroup.org> Date: Mon Nov 25 17:33:54 2019 -0600 Merge pull request #2055 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop * commit 'f907b511d06612dafc7814a7c30f2f3d2b76d52b': Oops, remove more C99 designated initializers for VS 2010 compatibility. commit 63858c22e168acaec0af8ced6641f26102cc6bb0 Merge: 20ae787 5c911d8 Author: David Young <dyoung@hdfgroup.org> Date: Mon Nov 25 17:04:42 2019 -0600 Merge remote-tracking branch 'hdf5/develop' into fprintf-experiment commit 5c911d8baf3ee7fe654269088eebdf07f59a8192 Merge: b8a5671 62208b0 Author: David Young <dyoung@hdfgroup.org> Date: Mon Nov 25 16:58:27 2019 -0600 Merge pull request #2030 in HDFFV/hdf5 from ~DYOUNG/vchoi_fork:add-werror-and-squash-some to develop * commit '62208b056a09c01855fbac7f75146be58ad6bfe5': (44 commits) Add an #include to get a function declaration. Don't use C99 designated initializers, they're not compatible with Visual Studio 2010. Quiet some more maybe-uninitialized warnings---each is a false positive, *sigh*. This is more code that may not compile with VS2010, *sigh sigh*. Always warn on maybe-uninitialized. -Wincompatible-pointer-types was not available until GCC 5, so enable it only if that's the GCC version we're using. Only promote maybe-uninitialized warnings to errors on GCC 8. Even on GCC 8, there may be false positives at low optimization levels? I need to check. Only use -Werror=cast-function-type with GCC 8 and later. Put all of the -W options back into the order I found them in so that it's easier to compare old and new config/gnu-flags. Add new source files to CMakeLists.txt. Mention the -Werror= flags in libhdf5.settings.in. free -> HDfree Promote decleration-after-statement warnings to errors. Quiet decleration-after-statement warnings. Move a statement under some declarations since some vintages of Visual Studio don't like declarations after statements. Document H5D__chunk_mem_xfree_wrapper(). Undo accidental test deletion. Oops, delete a debug printf that snuck in here. Undo my changes to the HD macros, hadn't really intended those to be on this branch.... Make errors of some more warnings. Move disabled warnings to DEVELOPER_WARNING_CFLAGS. Put just one warning option on a line, and sort some of the options. Cast to the parameter type, H5VL_token_t *, instead of to unsigned char *. Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to structs containing those arrays. Encapsulating the arrays in this way makes it easier to write and think about pointers to these types, casts to/from these types, etc. ... commit 20ae7877e33931b95e8c3502b027d6c3fe94a11f Merge: 46f8c61 edd5297 Author: David Young <dyoung@hdfgroup.org> Date: Fri Nov 22 15:34:09 2019 -0600 Merge remote-tracking branch 'origin/add-werror-and-squash-some' into fprintf-experiment commit 46f8c613d5117a8be5bc8385a072daa0b4262f06 Author: David Young <dyoung@hdfgroup.org> Date: Fri Nov 22 15:29:00 2019 -0600 GCC really wants us to use `ll` to format `long long`, so try to make that work before any other format modifier. Seems like we're not compiling the autoconf test program with -Werror=format ? Probably should. commit eee35b8ef3759c391327cd48a9b3c56b6f8abc99 Author: David Young <dyoung@hdfgroup.org> Date: Fri Nov 22 15:28:05 2019 -0600 It's hard to know just how wide an HDoff_t will be, and I don't think POSIX or C standards provide a PRI macro for it, so cast to intmax_t and format using PRIdMAX. commit 86eab12df7a89b546a38e99f8178dd2adbcb3433 Author: David Young <dyoung@hdfgroup.org> Date: Fri Nov 22 15:26:25 2019 -0600 URemove some casts.se the right format string for the argument. Here and there stop casting a printf argument. commit f722f7cbecbaa99449941484b014426f62f1bed5 Merge: 58e3743 6d5ec83 Author: David Young <dyoung@hdfgroup.org> Date: Fri Nov 22 14:44:16 2019 -0600 Merge branch 'add-werror-and-squash-some' into fprintf-experiment commit 58e3743b7faa9836606ee91798fe80dfc0040da7 Author: David Young <dyoung@hdfgroup.org> Date: Wed Nov 20 21:07:21 2019 -0600 Remove custom HDfprintf implementation, using the standard library's, instead. Take a swipe at repairing fprintf format strings, mainly replacing "%Hu" with "%" PRIuHSIZE, "%a" with "%" PRIuHADDR, "%Zu" with "%zu". Here and there remove an awkward cast of a printf argument to `long long` and use PRI[doux]8, PRI[doux]32, or PRI[doux]64, instead. Change occurrences of "%t" to "%s" and perform a suitable change of argument, `cond` -> `cond ? "TRUE" : "FALSE"`. Some occurrences of %Hu, %a, and %t remain, they just weren't flagged by the compiler because of #ifdef'age. commit d4366909293fa970c23512ac80e5d865d76cddbf Author: David Young <dyoung@hdfgroup.org> Date: Wed Nov 20 20:54:32 2019 -0600 Promote format-string warnigns to errors.
Diffstat (limited to 'test')
-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.c42
-rw-r--r--test/farray.c6
-rw-r--r--test/fheap.c48
-rw-r--r--test/fillval.c12
-rw-r--r--test/filter_plugin.c2
-rw-r--r--test/freespace.c8
-rw-r--r--test/hdfs.c5
-rw-r--r--test/hyperslab.c2
-rw-r--r--test/mf.c8
14 files changed, 89 insertions, 85 deletions
diff --git a/test/accum.c b/test/accum.c
index 548a04d..44af697 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 a2f07af..f5e78df 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 1dc13a1..880afb3 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 0afff66..3c97470 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 4ab3efa..fdaea7c 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -4306,7 +4306,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;
}
@@ -4520,7 +4520,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 6597afd..5382a70 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -340,49 +340,49 @@ 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 */
#ifdef QAK
-HDfprintf(stderr, "nelmts = %Hu, total EA size = %Hu\n", earray_stats.stored.nelmts,
+HDfprintf(stderr, "nelmts = %" PRIuHSIZE ", total EA size = %" PRIuHSIZE "\n", earray_stats.stored.nelmts,
(earray_stats.computed.hdr_size + earray_stats.computed.index_blk_size + earray_stats.stored.super_blk_size + earray_stats.stored.data_blk_size));
#endif /* QAK */
@@ -561,7 +561,7 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5EA_t *ea, haddr_t ea_addr)
FAIL_STACK_ERROR
#ifdef QAK
-HDfprintf(stderr, "ea_addr = %a\n", ea_addr);
+HDfprintf(stderr, "ea_addr = %" PRIuHADDR "\n", ea_addr);
H5Fflush(file, H5F_SCOPE_GLOBAL);
HDsystem("cp earray.h5 earray.h5.save");
#endif /* QAK */
@@ -1385,17 +1385,17 @@ eiter_fw_state(void *_eiter, const H5EA_create_t *cparam,
/* (same eqn. as in H5EA__dblock_sblk_idx()) */
sblk_idx = H5VM_log2_gen((uint64_t)(((idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
#ifdef QAK
-HDfprintf(stderr, "idx = %Hu, tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx, sblk_idx, tparam->sblk_info[sblk_idx].ndblks, tparam->sblk_info[sblk_idx].dblk_nelmts, tparam->sblk_info[sblk_idx].start_idx, tparam->sblk_info[sblk_idx].start_dblk);
+HDfprintf(stderr, "idx = %" PRIuHSIZE ", tparam->sblk_info[%u] = {%zu, %zu, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", idx, sblk_idx, tparam->sblk_info[sblk_idx].ndblks, tparam->sblk_info[sblk_idx].dblk_nelmts, tparam->sblk_info[sblk_idx].start_idx, tparam->sblk_info[sblk_idx].start_dblk);
#endif /* QAK */
state->nelmts = EA_NELMTS(cparam, tparam, idx, sblk_idx);
#ifdef QAK
-HDfprintf(stderr, "state->nelmts = %Hu\n", state->nelmts);
+HDfprintf(stderr, "state->nelmts = %" PRIuHSIZE "\n", state->nelmts);
#endif /* QAK */
state->ndata_blks = EA_NDATA_BLKS(cparam, tparam, idx, sblk_idx);
#ifdef QAK
-HDfprintf(stderr, "state->ndata_blks = %Hu\n", state->ndata_blks);
+HDfprintf(stderr, "state->ndata_blks = %" PRIuHSIZE "\n", state->ndata_blks);
#endif /* QAK */
/* Check if we have any super blocks yet */
@@ -1406,7 +1406,7 @@ HDfprintf(stderr, "state->ndata_blks = %Hu\n", state->ndata_blks);
state->nsuper_blks = (sblk_idx - eiter->base_sblk_idx) + 1;
#ifdef QAK
-HDfprintf(stderr, "state->nsuper_blks = %Hu\n", state->nsuper_blks);
+HDfprintf(stderr, "state->nsuper_blks = %" PRIuHSIZE "\n", state->nsuper_blks);
#endif /* QAK */
} /* end if */
else
@@ -1620,9 +1620,9 @@ eiter_rv_state(void *_eiter, const H5EA_create_t *cparam,
loc_sblk_idx = H5VM_log2_gen((uint64_t)(((loc_idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
} /* end else */
#ifdef QAK
-HDfprintf(stderr, "idx = %Hu, loc_idx = %Hu, eiter->max_sblk_idx = %u, idx_sblk_idx = %u, loc_sblk_idx = %u\n", idx, loc_idx, eiter->max_sblk_idx, idx_sblk_idx, loc_sblk_idx);
-HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx_sblk_idx, tparam->sblk_info[idx_sblk_idx].ndblks, tparam->sblk_info[idx_sblk_idx].dblk_nelmts, tparam->sblk_info[idx_sblk_idx].start_idx, tparam->sblk_info[idx_sblk_idx].start_dblk);
-HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", eiter->max_sblk_idx, tparam->sblk_info[eiter->max_sblk_idx].ndblks, tparam->sblk_info[eiter->max_sblk_idx].dblk_nelmts, tparam->sblk_info[eiter->max_sblk_idx].start_idx, tparam->sblk_info[eiter->max_sblk_idx].start_dblk);
+HDfprintf(stderr, "idx = %" PRIuHSIZE ", loc_idx = %" PRIuHSIZE ", eiter->max_sblk_idx = %u, idx_sblk_idx = %u, loc_sblk_idx = %u\n", idx, loc_idx, eiter->max_sblk_idx, idx_sblk_idx, loc_sblk_idx);
+HDfprintf(stderr, "tparam->sblk_info[%u] = {%zu, %zu, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", idx_sblk_idx, tparam->sblk_info[idx_sblk_idx].ndblks, tparam->sblk_info[idx_sblk_idx].dblk_nelmts, tparam->sblk_info[idx_sblk_idx].start_idx, tparam->sblk_info[idx_sblk_idx].start_dblk);
+HDfprintf(stderr, "tparam->sblk_info[%u] = {%zu, %zu, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", eiter->max_sblk_idx, tparam->sblk_info[eiter->max_sblk_idx].ndblks, tparam->sblk_info[eiter->max_sblk_idx].dblk_nelmts, tparam->sblk_info[eiter->max_sblk_idx].start_idx, tparam->sblk_info[eiter->max_sblk_idx].start_dblk);
#endif /* QAK */
if(idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
@@ -1631,7 +1631,7 @@ HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", eiter->max_s
idx_nelmts = EA_NELMTS(cparam, tparam, loc_idx, loc_sblk_idx);
state->nelmts = (eiter->max_nelmts - idx_nelmts) + cparam->idx_blk_elmts;
#ifdef QAK
-HDfprintf(stderr, "eiter->max_nelmts = %Hu, idx_nelmts = %Hu, state->nelmts = %Hu\n", eiter->max_nelmts, idx_nelmts, state->nelmts);
+HDfprintf(stderr, "eiter->max_nelmts = %" PRIuHSIZE ", idx_nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n", eiter->max_nelmts, idx_nelmts, state->nelmts);
#endif /* QAK */
if(idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
@@ -1640,7 +1640,7 @@ HDfprintf(stderr, "eiter->max_nelmts = %Hu, idx_nelmts = %Hu, state->nelmts = %H
idx_ndata_blks = EA_NDATA_BLKS(cparam, tparam, loc_idx, loc_sblk_idx);
state->ndata_blks = eiter->max_ndata_blks - idx_ndata_blks;
#ifdef QAK
-HDfprintf(stderr, "eiter->max_ndata_blks = %Hu, idx_ndata_blks = %Hu, state->ndata_blks = %Hu\n", eiter->max_ndata_blks, idx_ndata_blks, state->ndata_blks);
+HDfprintf(stderr, "eiter->max_ndata_blks = %" PRIuHSIZE ", idx_ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n", eiter->max_ndata_blks, idx_ndata_blks, state->ndata_blks);
#endif /* QAK */
/* Check if we have any super blocks yet */
@@ -1650,7 +1650,7 @@ HDfprintf(stderr, "eiter->max_ndata_blks = %Hu, idx_ndata_blks = %Hu, state->nda
else
state->nsuper_blks = (eiter->max_sblk_idx - eiter->idx_blk_nsblks) + 1;
#ifdef QAK
-HDfprintf(stderr, "eiter->idx_blk_nsblks = %Hu, state->nsuper_blks = %Hu\n", eiter->idx_blk_nsblks, state->nsuper_blks);
+HDfprintf(stderr, "eiter->idx_blk_nsblks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n", eiter->idx_blk_nsblks, state->nsuper_blks);
#endif /* QAK */
} /* end if */
} /* end else */
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 b1a0db0..4894f50 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -271,35 +271,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 */
@@ -9590,7 +9590,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -9726,7 +9726,7 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -9748,7 +9748,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object too large for initial block size in skipped indirect blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 3) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
@@ -9761,7 +9761,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (medium) block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 4) - obj_size;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10507,7 +10507,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -10661,7 +10661,7 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -10674,7 +10674,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows + 1) - obj_size;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10830,7 +10830,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -10999,7 +10999,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -11156,7 +11156,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -11333,7 +11333,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -11545,7 +11545,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -11741,7 +11741,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -11973,7 +11973,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
+HDfprintf(stderr, "obj_size = %zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
@@ -15523,7 +15523,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
total_obj_added += obj_size;
} /* end while */
#ifdef QAK
-HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids, total_obj_added, size_limit);
+HDfprintf(stderr, "keep_ids.num_ids = %zu, total_obj_added = %" PRIuHSIZE ", size_limit = %" PRIuHSIZE "\n", keep_ids.num_ids, total_obj_added, size_limit);
#endif /* QAK */
/* Randomize the order of the IDs kept */
@@ -15741,7 +15741,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
total_obj_added += obj_size;
} /* end while */
#ifdef QAK
-HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids, total_obj_added, size_limit);
+HDfprintf(stderr, "keep_ids.num_ids = %zu, total_obj_added = %" PRIuHSIZE ", size_limit = %" PRIuHSIZE "\n", keep_ids.num_ids, total_obj_added, size_limit);
#endif /* QAK */
/* Randomize the order of the IDs kept */
diff --git a/test/fillval.c b/test/fillval.c
index 72b8dcb..db979c6 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/hdfs.c b/test/hdfs.c
index ab39da6..9f5874f 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -235,9 +235,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 e702023..8434aad 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 7cfc954..8d646ba 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 */