From 215d0be3f6a927f8f92e14b3d0b77263c86c3370 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 Jan 2024 17:35:51 +0100 Subject: [PATCH] lib/pty-session: initialize timevals [-Werror=maybe-uninitialized] Signed-off-by: Karel Zak --- lib/pty-session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pty-session.c b/lib/pty-session.c index 3849065475..25dddd2fac 100644 --- a/lib/pty-session.c +++ b/lib/pty-session.c @@ -641,7 +641,7 @@ int ul_pty_proxy_master(struct ul_pty *pty) /* note, callback usually updates @next_callback_time */ if (timerisset(&pty->next_callback_time)) { - struct timeval now; + struct timeval now = { 0 };; DBG(IO, ul_debugobj(pty, " callback requested")); gettime_monotonic(&now); @@ -654,7 +654,7 @@ int ul_pty_proxy_master(struct ul_pty *pty) /* set timeout */ if (timerisset(&pty->next_callback_time)) { - struct timeval now, rest; + struct timeval now = { 0 }, rest = { 0 }; gettime_monotonic(&now); timersub(&pty->next_callback_time, &now, &rest); -- 2.47.3