From acc429bb37f7e2b6e7690abc8c7f94593edd21b5 Mon Sep 17 00:00:00 2001 From: darkstar Date: Wed, 21 Feb 2018 20:19:08 +0100 Subject: [PATCH] MSVC: remove gcc-ism for Visual Studio MSVC does not have __attribute__((foo)) --- src/plat.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plat.h b/src/plat.h index 0d038e9..aa5c47e 100644 --- a/src/plat.h +++ b/src/plat.h @@ -68,8 +68,13 @@ #endif +#ifndef _MSC_VER /* A hack (GCC-specific?) to allow us to ignore unused parameters. */ #define UNUSED(arg) __attribute__((unused))arg +#else +/* MSVC does not have __attribute__((unused)). */ +#define UNUSED(arg) arg +#endif /* Return the size (in wchar's) of a wchar_t array. */ #define sizeof_w(x) (sizeof((x)) / sizeof(wchar_t))