Page 1 of 1

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

Posted: 2012-10-04T21:37:42-07:00
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.

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

Posted: 2012-10-05T04:26:00-07:00
by magick
Thanks for the problem report and patch. We'll update the FPX distribution with the patch by sometime tomorrow.