Fix clang compile error. #297

This commit is contained in:
Fangrui Song 2018-01-15 09:23:51 -08:00
parent 1388e5190d
commit cf54cc9f26
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#if defined(__GNUC__) && !defined(__clang__) #if defined(__GNUC__)
#define ATTRIBUTE_UNUSED __attribute__((unused)) #define ATTRIBUTE_UNUSED __attribute__((unused))
#else #else
#define ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED

View File

@ -82,7 +82,7 @@ struct IndexFile;
::Reflect(visitor, value0); \ ::Reflect(visitor, value0); \
value = static_cast<type>(value0); \ value = static_cast<type>(value0); \
} \ } \
inline void Reflect(Writer& visitor, type& value) { \ ATTRIBUTE_UNUSED inline void Reflect(Writer& visitor, type& value) { \
auto value0 = static_cast<as_type>(value); \ auto value0 = static_cast<as_type>(value); \
::Reflect(visitor, value0); \ ::Reflect(visitor, value0); \
} }