summaryrefslogtreecommitdiffstats
path: root/src/H5FDlog.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-13 17:35:36 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:17:27 (GMT)
commitca0fcd34f3360d6fa1f7c630cfa3f54c95504d3e (patch)
tree0f9e5cb881d39d70561a691a4aef940a277b9e17 /src/H5FDlog.c
parent0206b1055e0e7d24bc3317876a02ecf9ad15cd26 (diff)
downloadhdf5-ca0fcd34f3360d6fa1f7c630cfa3f54c95504d3e.zip
hdf5-ca0fcd34f3360d6fa1f7c630cfa3f54c95504d3e.tar.gz
hdf5-ca0fcd34f3360d6fa1f7c630cfa3f54c95504d3e.tar.bz2
To quiet a warning, initialize some `struct timeval`s that the compiler
does not realize are always set before use by `gettimeofday`.
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r--src/H5FDlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index ac5667f..1c7d549 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -489,8 +489,8 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
#endif
#ifdef H5_HAVE_GETTIMEOFDAY
struct timeval timeval_start;
- struct timeval open_timeval_diff;
- struct timeval stat_timeval_diff;
+ struct timeval open_timeval_diff = {0, 0};
+ struct timeval stat_timeval_diff = {0, 0};
#endif /* H5_HAVE_GETTIMEOFDAY */
h5_stat_t sb;
H5FD_t *ret_value = NULL; /* Return value */