Page 1 of 1

A silly error in libfpx -- ph_image.h vs. f_fpxio.h

Posted: 2012-10-04T21:30:34-07:00
by mi
The same virtual method (CreateEmptyResolutionLevel) is declared with a slightly different signature in the two files.

GNU C++ did not mind, but clang is throwing a warning. The below patch (already part of FreeBSD port graphics/libfpx) resolves the problem by using the signature of the implementation in f_fpxio.cpp, where the method, actually, does something...

Code: Select all

--- ri_image/ph_image.h 2007-11-02 03:10:05.000000000 -0400
+++ ri_image/ph_image.h 2012-10-04 22:38:52.000000000 -0400
@@ -173,5 +173,5 @@
         virtual FPXStatus CreateInitResolutionLevelList();                    // Make a sub image list in read or write mode
         virtual FPXStatus CreateEmptyResolutionLevelList();                   // Make a sub image list in create mode
-    virtual PResolutionLevel* CreateEmptyResolutionLevel(int width, int height, long* quelImage); // Make a sub image in cre
ate mode
+    virtual PResolutionLevel* CreateEmptyResolutionLevel(int width, int height, int* quelImage); // Make a sub image in crea
te mode
     virtual PResolutionLevel* CreateInitResolutionLevel(int* offset, long id);           // Make a sub image in read or writ
e mode

--- ri_image/ph_image.cpp       2007-11-02 03:10:05.000000000 -0400
+++ ri_image/ph_image.cpp       2012-10-04 22:38:31.000000000 -0400
@@ -1127,5 +1127,5 @@
 //  ----------------------------------------------------------------------------
 // Make a sub resolution level in create mode
-PResolutionLevel* PHierarchicalImage::CreateEmptyResolutionLevel(int , int , long int*)
+PResolutionLevel* PHierarchicalImage::CreateEmptyResolutionLevel(int , int , int*)
 {
   return NULL;

Re: A silly error in libfpx -- ph_image.h vs. f_fpxio.h

Posted: 2012-10-05T04:31:19-07:00
by magick
Thanks for the problem report and patch. We get an updated distribution of FPX with your patch out by sometime tomorrow.