From 53576d39390392481769c03abfa1e68b0a56c11d Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 23 Jun 2021 13:41:58 +0900 Subject: [PATCH] common: fix compatibility issue for MSVC. __attribute__ syntax is not supported by MSVC. We can turn it on optionally. --- src/lib/tvgCommon.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/tvgCommon.h b/src/lib/tvgCommon.h index f5d4a6d0..52998b87 100644 --- a/src/lib/tvgCommon.h +++ b/src/lib/tvgCommon.h @@ -31,6 +31,10 @@ using namespace tvg; #define FILL_ID_LINEAR 0 #define FILL_ID_RADIAL 1 -#define TVG_UNUSED __attribute__ ((__unused__)) +#ifdef _MSC_VER + #define TVG_UNUSED +#else + #define TVG_UNUSED __attribute__ ((__unused__)) +#endif #endif //_TVG_COMMON_H_