common: fix compatibility issue for MSVC.
authorHermet Park <chuneon.park@samsung.com>
Wed, 23 Jun 2021 04:41:58 +0000 (13:41 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Jun 2021 00:26:30 +0000 (09:26 +0900)
__attribute__ syntax is not supported by MSVC.

We can turn it on optionally.

src/lib/tvgCommon.h

index f5d4a6d09e31d8dd6c6637ffd39b50cf98a14769..52998b873245331a2535d07688fd9ed1e2a8a0a6 100644 (file)
@@ -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_