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

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
yecril71pl
Posts: 81
Joined: 2011-02-08T11:06:09-07:00
Authentication code: 8675308
Location: Warsaw, Poland
Contact:

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

Post 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:
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

We applied your suggestion to the ImageMagick Subversion trunk, available by sometime tomorrow. Thanks.
Post Reply