diff options
author | David Young <dyoung@hdfgroup.org> | 2020-05-26 20:48:17 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-26 20:48:17 (GMT) |
commit | cd0eaf62715137d9332a52d6d19c4684f7660737 (patch) | |
tree | e9b7eeac38e51a5d8cc39e42b2aa5c6bb4ec88a5 /test/vfd_swmr_common.c | |
parent | 132f0f6ce28ee70726e16519ae20856d253c3e5c (diff) | |
download | hdf5-cd0eaf62715137d9332a52d6d19c4684f7660737.zip hdf5-cd0eaf62715137d9332a52d6d19c4684f7660737.tar.gz hdf5-cd0eaf62715137d9332a52d6d19c4684f7660737.tar.bz2 |
Cast a non-negative `int` to `size_t` before comparing with `size_t` so that
the compiler believes we know what we're doing and does not warn.
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r-- | test/vfd_swmr_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index f5cb293..fb93705 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -45,7 +45,7 @@ esnprintf(char *buf, size_t bufsz, const char *fmt, ...) if (rc < 0) err(EXIT_FAILURE, "%s: vsnprintf", __func__); - else if (rc >= bufsz) + else if ((size_t)rc >= bufsz) errx(EXIT_FAILURE, "%s: buffer too small", __func__); } |