summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.c
diff options
context:
space:
mode:
authorSami Kerola2019-02-09 10:34:52 +0100
committerKarel Zak2019-02-18 13:19:24 +0100
commit4813a5210f6fb979d8f7a592f71a2f9c4d3db179 (patch)
tree90f4aafc604b9a676c0f614281076d8ab52686da /sys-utils/hwclock.c
parentcal: fix Sexit and Senter (diff)
downloadkernel-qcow2-util-linux-4813a5210f6fb979d8f7a592f71a2f9c4d3db179.tar.gz
kernel-qcow2-util-linux-4813a5210f6fb979d8f7a592f71a2f9c4d3db179.tar.xz
kernel-qcow2-util-linux-4813a5210f6fb979d8f7a592f71a2f9c4d3db179.zip
various: fix 'uninitialized when used' warnings [clang]
This change fixes "warning: variable 'var' may be uninitialized when used here [-Wconditional-uninitialized]" warnings reported in various files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r--sys-utils/hwclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index d9acbaf7d..5f4c014fc 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -954,7 +954,7 @@ manipulate_clock(const struct hwclock_control *ctl, const time_t set_time,
const struct timeval startup_time, struct adjtime *adjtime)
{
/* The time at which we read the Hardware Clock */
- struct timeval read_time;
+ struct timeval read_time = { 0 };
/*
* The Hardware Clock gives us a valid time, or at
* least something close enough to fool mktime().