From cf54cc9f265e20b65063dfc6345c4ef59d2ad96b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 15 Jan 2018 09:23:51 -0800 Subject: [PATCH] Fix clang compile error. #297 --- src/port.h | 2 +- src/serializer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/port.h b/src/port.h index 7f451ab3..d2a1db03 100644 --- a/src/port.h +++ b/src/port.h @@ -1,6 +1,6 @@ #pragma once -#if defined(__GNUC__) && !defined(__clang__) +#if defined(__GNUC__) #define ATTRIBUTE_UNUSED __attribute__((unused)) #else #define ATTRIBUTE_UNUSED diff --git a/src/serializer.h b/src/serializer.h index 1132af14..2e66737f 100644 --- a/src/serializer.h +++ b/src/serializer.h @@ -82,7 +82,7 @@ struct IndexFile; ::Reflect(visitor, value0); \ value = static_cast(value0); \ } \ - inline void Reflect(Writer& visitor, type& value) { \ + ATTRIBUTE_UNUSED inline void Reflect(Writer& visitor, type& value) { \ auto value0 = static_cast(value); \ ::Reflect(visitor, value0); \ }