Page 1 of 1

MagickMin not fully converted to macro

Posted: 2015-02-11T09:50:01-07:00
by zebediah49
Trying to compile imagemagick version 6.8.9.9, I got a bug

Code: Select all

In file included from coders/dps.c:50:0:
coders/dps.c:96:32: error: expected identifier or '(' before 'const'
 static inline double MagickMin(const double x,const double y)
                                ^
./magick/image-private.h:28:28: note: in definition of macro 'MagickMin'
 #define MagickMin(x,y)  (((x) < (y)) ? (x) : (y))
                            ^
./magick/image-private.h:28:31: error: expected ')' before '<' token
 #define MagickMin(x,y)  (((x) < (y)) ? (x) : (y))
                               ^
coders/dps.c:96:22: note: in expansion of macro 'MagickMin'
 static inline double MagickMin(const double x,const double y)
                      ^
./magick/image-private.h:28:38: error: expected ')' before '?' token
 #define MagickMin(x,y)  (((x) < (y)) ? (x) : (y))
                                      ^
coders/dps.c:96:22: note: in expansion of macro 'MagickMin'
 static inline double MagickMin(const double x,const double y)
                      ^
Makefile:7584: recipe for target 'coders/coders_dps_la-dps.lo' failed
Upon looking for it, I find that revision 17443 changed MagickMax and MagickMin to be macros rather than inlines. I've generally heard that that's the unpreferred direction, but whatever. The relevant part is that coders/dps.c was not converted, and still contains that inline declaration.

Re: MagickMin not fully converted to macro

Posted: 2015-02-11T10:17:39-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.9.0-6 Beta available by sometime tomorrow. Thanks.