An ancient wart remaining in libfpx' fpx/fpxlib.cpp

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

An ancient wart remaining in libfpx' fpx/fpxlib.cpp

Post by mi »

The ReadPage() and ReadPageLine() methods must've been returning int at some point so the calling method tried to analyze the response to turn it into a probable FPXStatus (an enum).

The methods now (and since, at least, 1.2) are already returning FPXStatus themselves, so the analysis is not necessary. Worse, because the checks were comparing FPXStatus with negative values, clang++ complains, because those (-2, -3) aren't valid in the enum.

The patch (a bit too large to just copy-paste here) is now part of the FreeBSD port graphics/libfpx.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: An ancient wart remaining in libfpx' fpx/fpxlib.cpp

Post by magick »

Thanks for the problem report and patch. We'll update the FPX distribution with the patch by sometime tomorrow.
Post Reply