From 97e487d0d4797d9645eb91d810dc2c396f45a954 Mon Sep 17 00:00:00 2001 From: Brennan Ashton Date: Wed, 29 Apr 2020 21:52:25 -0700 Subject: [PATCH] Fix uninitialized variable warning in ostest In lowpri_thread if sem_wait fail nwaiting will not be set even though the rest of the function uses it. This is a failure so really just handling the compiler warning with this. Signed-off-by: Brennan Ashton --- testing/ostest/prioinherit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/ostest/prioinherit.c b/testing/ostest/prioinherit.c index 860c7f5b9..13ddd476d 100644 --- a/testing/ostest/prioinherit.c +++ b/testing/ostest/prioinherit.c @@ -253,7 +253,7 @@ static void *lowpri_thread(void *parameter) int count; int policy; int ret; - int nwaiting; + int nwaiting = 0; int i; g_lowstate[threadno-1] = RUNNING;