diff options
author | David Young <dyoung@hdfgroup.org> | 2019-09-23 19:35:46 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-09-23 19:35:46 (GMT) |
commit | d4ecff831907084c37490e11d5dcb345e2a9326d (patch) | |
tree | 07164ce8c0c5be941791573b8f5b7623c481f2c3 | |
parent | 0880c57d13ee2b3811ac22e7efdbc0130448e6bb (diff) | |
download | hdf5-d4ecff831907084c37490e11d5dcb345e2a9326d.zip hdf5-d4ecff831907084c37490e11d5dcb345e2a9326d.tar.gz hdf5-d4ecff831907084c37490e11d5dcb345e2a9326d.tar.bz2 |
Fix some incorrect format strings.
-rw-r--r-- | test/swmr_sparse_reader.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_sparse_reader.c | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index 3c98f48..eb6e4fb 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -29,6 +29,7 @@ /* Headers */ /***********/ +#include <inttypes.h> /* for PRIu64 */ #include "h5test.h" #include "swmr_common.h" @@ -115,10 +116,10 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t /* Emit informational message */ if(verbose) - HDfprintf(stderr, "Symbol = '%s', location = %lld\n", symbol->name, (long long)start); + HDfprintf(stderr, "Symbol = '%s', location = %Hu, %Hu\n", symbol->name, start[0], start[1]); /* Read record from dataset */ - record->rec_id = (uint64_t)ULLONG_MAX; + record->rec_id = UINT64_MAX; if(H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0) return -1; @@ -126,7 +127,7 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t if(record->rec_id != start[1]) { HDfprintf(stderr, "*** ERROR ***\n"); HDfprintf(stderr, "Incorrect record value!\n"); - HDfprintf(stderr, "Symbol = '%s', location = %lld, record->rec_id = %llu\n", symbol->name, (long long)start, (unsigned long long)record->rec_id); + HDfprintf(stderr, "Symbol = '%s', location = %Hu, %Hu, record->rec_id = %" PRIu64 "\n", symbol->name, start[0], start[1], record->rec_id); return -1; } /* end if */ diff --git a/test/vfd_swmr_sparse_reader.c b/test/vfd_swmr_sparse_reader.c index e2d7058..4006c70 100644 --- a/test/vfd_swmr_sparse_reader.c +++ b/test/vfd_swmr_sparse_reader.c @@ -30,6 +30,8 @@ /* Headers */ /***********/ +#include <inttypes.h> /* for PRIu64 */ + #include "h5test.h" #include "vfd_swmr_common.h" @@ -120,7 +122,7 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t symbol->name, symbol->nrecords, symbol->name, start[0], start[1]); /* Read record from dataset */ - record->rec_id = (uint64_t)ULLONG_MAX; + record->rec_id = UINT64_MAX; if(H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0) goto error; @@ -128,7 +130,7 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t if(record->rec_id != start[1]) { HDfprintf(stderr, "*** READER: ERROR ***\n"); HDfprintf(stderr, "Incorrect record value!\n"); - HDfprintf(stderr, "Symbol = '%s', location = %lld, record->rec_id = %llu\n", symbol->name, (long long)start, (unsigned long long)record->rec_id); + HDfprintf(stderr, "Symbol = '%s', location = %Hu, %Hu, record->rec_id = %" PRIu64 "\n", symbol->name, start[0], start[1], record->rec_id); goto error; } /* end if */ |