From 919b7ee54fd8f2bada066e90f31c682fb70c2821 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 28 Dec 2017 23:01:44 -0800 Subject: fixes #158 nni_plat_init: undefined return value if called from two threads --- src/platform/windows/win_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platform/windows') diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c index 6cfb4162..971c7c37 100644 --- a/src/platform/windows/win_thread.c +++ b/src/platform/windows/win_thread.c @@ -142,7 +142,7 @@ static LONG plat_inited = 0; int nni_plat_init(int (*helper)(void)) { - int rv; + int rv = 0; static SRWLOCK lock = SRWLOCK_INIT; if (plat_inited) { -- cgit v1.2.3-70-g09d2