diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/accum.c | 13 | ||||
-rw-r--r-- | test/big.c | 6 | ||||
-rw-r--r-- | test/cache_common.c | 16 | ||||
-rw-r--r-- | test/chunk_info.c | 2 | ||||
-rw-r--r-- | test/dsets.c | 4 | ||||
-rw-r--r-- | test/earray.c | 42 | ||||
-rw-r--r-- | test/farray.c | 6 | ||||
-rw-r--r-- | test/fheap.c | 48 | ||||
-rw-r--r-- | test/fillval.c | 12 | ||||
-rw-r--r-- | test/filter_plugin.c | 2 | ||||
-rw-r--r-- | test/freespace.c | 8 | ||||
-rw-r--r-- | test/h5test.c | 4 | ||||
-rw-r--r-- | test/hdfs.c | 5 | ||||
-rw-r--r-- | test/hyperslab.c | 2 | ||||
-rw-r--r-- | test/mf.c | 8 | ||||
-rw-r--r-- | test/mirror_vfd.c | 6 | ||||
-rw-r--r-- | test/ros3.c | 39 | ||||
-rw-r--r-- | test/s3comms.c | 36 |
18 files changed, 142 insertions, 117 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"); @@ -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/h5test.c b/test/h5test.c index 1b445dd..a76f953 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; } @@ -2100,7 +2100,7 @@ h5_compare_file_bytes(char *f1name, char *f2name) HDfread(&f1char, 1, 1, f1ptr); HDfread(&f2char, 1, 1, f2ptr); 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 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 */ @@ -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 4da742f..00ccf08 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -2457,7 +2457,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; } @@ -2472,7 +2473,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 73b6ac2..6618194 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 9453b75..77dfc7d 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; |