From 3895a7db7cb7c25a8b36dc51460224ff11b49fa2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 15 Jul 2016 22:32:03 +0200 Subject: Suppres clang warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libclut.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/libclut.h b/src/libclut.h index 9790c84..76f4840 100644 --- a/src/libclut.h +++ b/src/libclut.h @@ -24,19 +24,25 @@ /* This is to avoid warnings about comparing double, which is safe in our case. { */ -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wfloat-equal" #endif static inline int libclut_eq__(double a, double b) { return a == b; } static inline int libclut_1__(double x) { return libclut_eq__(x, 1); } static inline int libclut_0__(double x) { return libclut_eq__(x, 0); } -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) # pragma GCC diagnostic pop #endif /* } */ +#if defined(__clang__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdocumentation" +#endif + + /** * Apply contrast correction on the colour curves using sRGB. @@ -1043,10 +1049,10 @@ static inline int libclut_0__(double x) { return libclut_eq__(x, 0); } -#if __GNUC__ -#define LIBCLUT_GCC_ONLY__(x) x +#if defined(__GNUC__) && !defined(__clang__) +# define LIBCLUT_GCC_ONLY__(x) x #else -#define LIBCLUT_GCC_ONLY__(x) /* do nothing */ +# define LIBCLUT_GCC_ONLY__(x) /* do nothing */ #endif @@ -1351,5 +1357,10 @@ void (libclut_model_cielab_to_ciexyz)(double, double, double, double*, double*, +#if defined(__clang__) +# pragma GCC diagnostic pop +#endif + + #endif -- cgit v1.2.3-70-g09d2