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>2019-11-13 17:35:36 (GMT)
commite2d9cc558448224360d0641d225b9f71344c3e5a (patch)
tree2efbbaa3204f2aa8524dd5d29ecd030e5f6b9eb6 /src/H5FDlog.c
parent833c0a2fc62927b1c1920c895f760260c3515b9b (diff)
downloadhdf5-e2d9cc558448224360d0641d225b9f71344c3e5a.zip
hdf5-e2d9cc558448224360d0641d225b9f71344c3e5a.tar.gz
hdf5-e2d9cc558448224360d0641d225b9f71344c3e5a.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 */