From: Karel Zak Date: Thu, 18 Jan 2024 19:43:51 +0000 (+0100) Subject: fsck: initialize timevals [-Werror=maybe-uninitialized] X-Git-Tag: v2.40-rc1~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e4cf9e7547b4211cc6a9dbf160af01bffea0261;p=thirdparty%2Futil-linux.git fsck: initialize timevals [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak --- diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c index 2a54dc5d1c..c63ce1c23a 100644 --- a/disk-utils/fsck.c +++ b/disk-utils/fsck.c @@ -594,7 +594,7 @@ static int progress_active(void) */ static void print_stats(struct fsck_instance *inst) { - struct timeval delta; + struct timeval delta = { 0 }; if (!inst || !report_stats || noexecute) return; diff --git a/lib/monotonic.c b/lib/monotonic.c index cd554dd719..63feec0fbd 100644 --- a/lib/monotonic.c +++ b/lib/monotonic.c @@ -18,10 +18,10 @@ int get_boot_time(struct timeval *boot_time) { #ifdef CLOCK_BOOTTIME - struct timespec hires_uptime; - struct timeval lores_uptime; + struct timespec hires_uptime = { 0 }; + struct timeval lores_uptime = { 0 }; #endif - struct timeval now; + struct timeval now = { 0 }; #ifdef HAVE_SYSINFO struct sysinfo info; #endif