summaryrefslogtreecommitdiffstats
path: root/tools
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 /tools
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 'tools')
-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/h5stat/h5stat.c72
-rw-r--r--tools/src/misc/h5clear.c2
-rw-r--r--tools/src/misc/h5debug.c2
-rw-r--r--tools/test/perform/chunk_cache.c8
-rw-r--r--tools/test/perform/sio_engine.c2
-rw-r--r--tools/test/perform/sio_perf.c4
11 files changed, 56 insertions, 56 deletions
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 b59ae93..2477de2 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 */
@@ -3313,7 +3313,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 1df205c..364cdcd 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 95aff48..7086388 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 765ab63..08a561e 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)));
}
}
@@ -2126,7 +2126,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/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index fb3d50d7..f94ab65 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 f95d1bc..b81e2b3 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -363,7 +363,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 e9a783b..f986354 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -351,7 +351,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/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/sio_engine.c b/tools/test/perform/sio_engine.c
index aa3a316..5a2208d 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");
}