Page 1 of 1

'respect_parenthesis' defined but not used

Posted: 2011-02-24T14:16:41-07:00
by yecril71pl
CC wand/wand_libMagickWand_la-animate.lo
./wand/mogrify-private.h:126:3: warning: 'respect_parenthesis' defined but not used
Declaration:

Code: Select all

static MagickBooleanType
  respect_parenthesis = MagickFalse;
The warning is reported because respect_parenthesis is not constant. However, it cannot be made constant because it is being modified in the code:
wand/compare.c: In function 'CompareImageCommand':
wand/compare.c:790:13: error: assignment of read-only variable 'respect_parenthesis'
So respect_parenthesis is a modified static variable which makes the code non-reentrant.

For the time being, just to make things compile, I am going to make it a constant except for the files that need it:

Code: Select all

#ifndef MAGICK_WAND_RESP_PAR_MOD
#define MAGICK_WAND_RESP_PAR_MOD const 
#endif
to make an error out of it, compile with -DMAGICK_WAND_RESP_PAR_MOD=const

The following sources try to modify a variable thus declared (note that they are all distinct variables with the same name): animate.c, compare.c, composite.c, convert.c, display.c, identify.c,import.c, mogrify.c, montage.c and stream.c.

Re: 'respect_parenthesis' defined but not used

Posted: 2011-02-24T17:32:42-07:00
by magick
We'll have a fix for this problem in the next point release of ImageMagick, 6.6.7-10. Thanks.