diff options
author | David Young <dyoung@hdfgroup.org> | 2022-02-21 21:31:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 21:31:57 (GMT) |
commit | c302773438a4db0b56d32eaf9cf8a92b56848c0a (patch) | |
tree | c8be334db0a2f136ccfdacbadc3df0c1781a2628 /tools/lib/h5tools_str.h | |
parent | 705ba09e76d0bb4af88b7b7cde1f90c64c9e3753 (diff) | |
download | hdf5-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_str.h')
-rw-r--r-- | tools/lib/h5tools_str.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index eee87c9..f4610f0 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -26,7 +26,7 @@ typedef struct h5tools_str_t { H5TOOLS_DLL void h5tools_str_close(h5tools_str_t *str); H5TOOLS_DLL size_t h5tools_str_len(h5tools_str_t *str); -H5TOOLS_DLL char * h5tools_str_append(h5tools_str_t *str, const char *fmt, ...); +H5TOOLS_DLL char * h5tools_str_append(h5tools_str_t *str, const char *fmt, ...) H5_ATTR_FORMAT(printf, 2, 3); H5TOOLS_DLL char * h5tools_str_reset(h5tools_str_t *str); H5TOOLS_DLL char * h5tools_str_trunc(h5tools_str_t *str, size_t size); H5TOOLS_DLL char * h5tools_str_fmt(h5tools_str_t *str, size_t start, const char *fmt); |