diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-15 22:32:03 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-15 22:32:03 +0200 |
commit | 3895a7db7cb7c25a8b36dc51460224ff11b49fa2 (patch) | |
tree | 66413e2323fedee54f6b9ba98281d3863f92a544 | |
parent | Document libclut_translate in info manual (diff) | |
download | libclut-3895a7db7cb7c25a8b36dc51460224ff11b49fa2.tar.gz libclut-3895a7db7cb7c25a8b36dc51460224ff11b49fa2.tar.bz2 libclut-3895a7db7cb7c25a8b36dc51460224ff11b49fa2.tar.xz |
Suppres clang warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | src/libclut.h | 21 |
1 files changed, 16 insertions, 5 deletions
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 |