summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.h
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2022-02-21 21:31:57 (GMT)
committerGitHub <noreply@github.com>2022-02-21 21:31:57 (GMT)
commitc302773438a4db0b56d32eaf9cf8a92b56848c0a (patch)
treec8be334db0a2f136ccfdacbadc3df0c1781a2628 /tools/lib/h5tools_utils.h
parent705ba09e76d0bb4af88b7b7cde1f90c64c9e3753 (diff)
downloadhdf5-c302773438a4db0b56d32eaf9cf8a92b56848c0a.zip
hdf5-c302773438a4db0b56d32eaf9cf8a92b56848c0a.tar.gz
hdf5-c302773438a4db0b56d32eaf9cf8a92b56848c0a.tar.bz2
Sprinkle H5_ATTR_FORMAT over printf(3)-like functions in tools and fix issues (#1423)
* Correct some conversion specifications. * Replace many "%lld" occurrences with "%" PRIuHSIZE except for a few instances where PRIdHSIZE was appropriate. Remove a couple of casts and use correct format strings, instead. * Copy values from a possibly unaligned buffer to aligned local variables instead of casting and dereferencing pointers into the buffer. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/lib/h5tools_utils.h')
-rw-r--r--tools/lib/h5tools_utils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index 3733742..4cf4e40 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -70,11 +70,11 @@ H5TOOLS_DLLVAR unsigned h5tools_nCols; /*max number of columns for outputting *
/* Definitions of useful routines */
H5TOOLS_DLL void indentation(unsigned);
H5TOOLS_DLL void print_version(const char *progname);
-H5TOOLS_DLL void parallel_print(const char *format, ...);
+H5TOOLS_DLL void parallel_print(const char *format, ...) H5_ATTR_FORMAT(printf, 1, 2);
H5TOOLS_DLL herr_t parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems,
char ***ptrs_out);
-H5TOOLS_DLL void error_msg(const char *fmt, ...);
-H5TOOLS_DLL void warn_msg(const char *fmt, ...);
+H5TOOLS_DLL void error_msg(const char *fmt, ...) H5_ATTR_FORMAT(printf, 1, 2);
+H5TOOLS_DLL void warn_msg(const char *fmt, ...) H5_ATTR_FORMAT(printf, 1, 2);
H5TOOLS_DLL void help_ref_msg(FILE *output);
H5TOOLS_DLL void free_table(table_t *table);
#ifdef H5DUMP_DEBUG