]> git.ipfire.org Git - thirdparty/openvpn.git/commit
ssl_common.h: fix 'not all control paths return a value' msvc warning
authorLev Stipakov <lev@openvpn.net>
Thu, 17 Dec 2020 22:48:34 +0000 (00:48 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 20 Dec 2020 20:07:26 +0000 (21:07 +0100)
commit86d7e9902db7fcbbbc31aaa5b69bee82375caa21
treee0ceb100f035e0c83f83be7d111ef5523e7a6a0f
parentab4688e3bd78d010ccc96adec66ab552bd009328
ssl_common.h: fix 'not all control paths return a value' msvc warning

Commit cc5a71637 ("Replace key_scan array of static pointers with inline
function") has introduced get_key_scan() routine with switch statement
which calls ASSERT() in the default case.

Even though "this should never happen", this code triggers Level 1 warning
"not all control paths return a value" in msvc.

Fix by adding "return NULL; /* NOTREACHED */" after ASSERT.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201217224834.160-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21373.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl_common.h