From eac2b9a271be1526efddcde3f22533c3205ded2a Mon Sep 17 00:00:00 2001 From: alfred gedeon Date: Tue, 28 Apr 2020 14:42:34 -0700 Subject: [PATCH] Fix Linux port Valgrind errors (#56) Fix Valgrind uninitialized variables warning. Co-authored-by: Alfred Gedeon --- portable/ThirdParty/GCC/Posix/port.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index bae6e2f84..a00ab172c 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -280,10 +280,14 @@ struct sigaction sigtick; * up running on the main thread when it is resumed. */ itimer.it_value.tv_sec = 0; itimer.it_value.tv_usec = 0; + + itimer.it_interval.tv_sec = 0; + itimer.it_interval.tv_usec = 0; (void)setitimer( ITIMER_REAL, &itimer, NULL ); sigtick.sa_flags = 0; sigtick.sa_handler = SIG_IGN; + sigemptyset( &sigtick.sa_mask ); sigaction( SIGALRM, &sigtick, NULL ); /* Signal the scheduler to exit its loop. */