]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add noreturn attribute for MSVC to assert_failed method.
authorArne Schwabe <arne@rfc2549.org>
Wed, 12 May 2021 13:15:08 +0000 (15:15 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 14 May 2021 12:42:21 +0000 (14:42 +0200)
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210512131511.1309914-7-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22344.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/error.h

index 1a552165488ff184819c4dd1f5369fda1037aed6..469afe20a98f758aa6573877182afb8ee1592f03 100644 (file)
@@ -202,8 +202,14 @@ FILE *msg_fp(const unsigned int flags);
 #define ASSERT(x) do { if (!(x)) {assert_failed(__FILE__, __LINE__, NULL);}} while (false)
 #endif
 
+#ifdef _MSC_VER
+__declspec(noreturn)
+#endif
 void assert_failed(const char *filename, int line, const char *condition)
-__attribute__((__noreturn__));
+#ifndef _MSC_VER
+__attribute__((__noreturn__))
+#endif
+;
 
 /* Poor-man's static_assert() for when not supplied by assert.h, taken from
  * Linux's sys/cdefs.h under GPLv2 */