Page 1 of 1

coders/mat.c:450:15: warning: 'DecompressBlock' defined but

Posted: 2011-02-20T14:28:20-07:00
by yecril71pl
coders/mat.c:450:15: warning: 'DecompressBlock' defined but not used
This DecompressBlock thing is used only if defined(MAGICKCORE_ZLIB_DELEGATE) but defined to return NULL otherwise, which causes a compiler warning.

It should be defined only if defined(MAGICKCORE_ZLIB_DELEGATE).

If you insist, make it a macro:

Code: Select all

#if defined(MAGICKCORE_ZLIB_DELEGATE)
yadda yadda yadda
#else
#define DecompressBlock(A,B,C,D) (NULL)
#endif
Besides, naming a local variable ‘DecompressBlock’ looks like an attempt to confuse the reader :shock:

Re: coders/mat.c:450:15: warning: 'DecompressBlock' defined

Posted: 2011-02-20T18:10:31-07:00
by magick
We applied your suggestion to the ImageMagick Subversion trunk, available by sometime tomorrow. Thanks.