diff options
author | kwm <kwm@FreeBSD.org> | 2014-12-21 04:23:34 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2014-12-21 04:23:34 +0800 |
commit | a3ed874d6f8eea6279f5a237efa1ba945215cf6c (patch) | |
tree | 0ca637fc7c63e50e4e88d3b78f872c082ce336c9 /graphics/ImageMagick | |
parent | e24e4536f48d0490c933e16e5a8b34b3b0715286 (diff) | |
download | freebsd-ports-graphics-a3ed874d6f8eea6279f5a237efa1ba945215cf6c.tar.gz freebsd-ports-graphics-a3ed874d6f8eea6279f5a237efa1ba945215cf6c.tar.zst freebsd-ports-graphics-a3ed874d6f8eea6279f5a237efa1ba945215cf6c.zip |
Fix several clang 3.5.0 warnings in the IM code.
PR: 196135
Submitted by: dim@
Diffstat (limited to 'graphics/ImageMagick')
3 files changed, 106 insertions, 0 deletions
diff --git a/graphics/ImageMagick/files/patch-magic__magick-type.h b/graphics/ImageMagick/files/patch-magic__magick-type.h new file mode 100644 index 00000000000..3a0129481ea --- /dev/null +++ b/graphics/ImageMagick/files/patch-magic__magick-type.h @@ -0,0 +1,58 @@ +--- magick/magick-type.h.orig 2014-08-08 16:27:39.000000000 +0200 ++++ magick/magick-type.h 2014-12-19 17:31:35.000000000 +0100 +@@ -45,12 +45,16 @@ extern "C" { + */ + #if MAGICKCORE_SIZEOF_FLOAT_T == 0 + typedef float MagickRealType; ++#define fabs fabsf + #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_FLOAT) + typedef float MagickRealType; ++#define fabs fabsf + #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_DOUBLE) + typedef double MagickRealType; ++#define fabs fabs + #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_LONG_DOUBLE) + typedef long double MagickRealType; ++#define fabs fabsl + #else + # error Your float_t type is neither a float, nor a double, nor a long double + #endif +@@ -74,12 +78,16 @@ typedef unsigned char Quantum; + */ + #if MAGICKCORE_SIZEOF_FLOAT_T == 0 + typedef float MagickRealType; ++#define fabs fabsf + #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_FLOAT) + typedef float MagickRealType; ++#define fabs fabsf + #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_DOUBLE) + typedef double MagickRealType; ++#define fabs fabs + #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_LONG_DOUBLE) + typedef long double MagickRealType; ++#define fabs fabsl + #else + # error Your float_t type is neither a float, nor a double, nor a long double + #endif +@@ -103,10 +111,13 @@ typedef unsigned short Quantum; + */ + #if MAGICKCORE_SIZEOF_DOUBLE_T == 0 + typedef double MagickRealType; ++#define fabs fabs + #elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_DOUBLE) + typedef double MagickRealType; ++#define fabs fabs + #elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_LONG_DOUBLE) + typedef long double MagickRealType; ++#define fabs fabsl + #else + # error Your double_t type is neither a float, nor a double, nor a long double + #endif +@@ -131,6 +142,7 @@ typedef long double SignedQuantum; + typedef long double Quantum; + #define QuantumRange 18446744073709551615.0 + #define QuantumFormat "%g" ++#define fabs fabsl + #else + #if !defined(_CH_) + # error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64" diff --git a/graphics/ImageMagick/files/patch-magic__method-attribute.h b/graphics/ImageMagick/files/patch-magic__method-attribute.h new file mode 100644 index 00000000000..ff677afab4f --- /dev/null +++ b/graphics/ImageMagick/files/patch-magic__method-attribute.h @@ -0,0 +1,24 @@ +--- magick/method-attribute.h.orig 2014-03-21 19:28:48.000000000 +0100 ++++ magick/method-attribute.h 2014-12-19 17:09:11.000000000 +0100 +@@ -123,14 +123,18 @@ extern "C" { + # define magick_unreferenced(x) /* nothing */ + #endif + +-#if (defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))) && !defined(__apple_build_version__) ++#if !defined(__clang__) && (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) + # define magick_alloc_size(x) __attribute__((__alloc_size__(x))) + # define magick_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) +-# define magick_cold_spot __attribute__((__cold__)) +-# define magick_hot_spot __attribute__((__hot__)) + #else + # define magick_alloc_size(x) /* nothing */ + # define magick_alloc_sizes(x,y) /* nothing */ ++#endif ++ ++#if defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) ++# define magick_cold_spot __attribute__((__cold__)) ++# define magick_hot_spot __attribute__((__hot__)) ++#else + # define magick_cold_spot + # define magick_hot_spot + #endif diff --git a/graphics/ImageMagick/files/patch-wand__method-attribute.h b/graphics/ImageMagick/files/patch-wand__method-attribute.h new file mode 100644 index 00000000000..56e4e76ad7d --- /dev/null +++ b/graphics/ImageMagick/files/patch-wand__method-attribute.h @@ -0,0 +1,24 @@ +--- wand/method-attribute.h.orig 2014-06-18 15:21:47.000000000 +0200 ++++ wand/method-attribute.h 2014-12-19 17:09:14.000000000 +0100 +@@ -116,14 +116,18 @@ extern "C" { + # define wand_unreferenced(x) /* nothing */ + #endif + +-#if (defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))) && !defined(__apple_build_version__) ++#if !defined(__clang__) && (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) + # define wand_alloc_size(x) __attribute__((__alloc_size__(x))) + # define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) +-# define wand_cold_spot __attribute__((__cold__)) +-# define wand_hot_spot __attribute__((__hot__)) + #else + # define wand_alloc_size(x) /* nothing */ + # define wand_alloc_sizes(x,y) /* nothing */ ++#endif ++ ++#if defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) ++# define wand_cold_spot __attribute__((__cold__)) ++# define wand_hot_spot __attribute__((__hot__)) ++#else + # define wand_cold_spot + # define wand_hot_spot + #endif |