'respect_parenthesis' defined but not used

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:

'respect_parenthesis' defined but not used

Post 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.
Last edited by yecril71pl on 2011-03-01T15:56:04-07:00, edited 2 times in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 'respect_parenthesis' defined but not used

Post by magick »

We'll have a fix for this problem in the next point release of ImageMagick, 6.6.7-10. Thanks.
Post Reply