File pfstools-gcc.patch of Package pfstools

--- src/fileformat/exrio.cpp
+++ src/fileformat/exrio.cpp
@@ -87,7 +87,8 @@
       (*B)(x,y) = tmp_img[idx].b;
       idx++;
     }
-  delete tmp_img;
+  delete [] tmp_img;
+  tmp_img = NULL;
 }
 
 OpenEXRReader::~OpenEXRReader()
@@ -131,5 +132,6 @@
     throw pfs::Exception( exc.what() );
   }
 
-  delete tmp_img;
+  delete [] tmp_img;
+  tmp_img = NULL;
 }
--- src/filter/pfspanoramic.cpp
+++ src/filter/pfspanoramic.cpp
@@ -93,7 +93,7 @@
   }
 
   //TODO: optimize rotations by precomputing sines and cosines
-  Vector3D rotateX(double angle)
+  void rotateX(double angle)
   {
     angle *= (M_PI / 180);
 
@@ -107,7 +107,7 @@
     z = z2;
   }
 
-  Vector3D rotateY(double angle)
+  void rotateY(double angle)
   {
     angle *= (M_PI / 180);
 
@@ -121,7 +121,7 @@
     z = z2;
   }
 
-  Vector3D rotateZ(double angle)
+  void rotateZ(double angle)
   {
     angle *= (M_PI / 180);
 
@@ -195,7 +195,7 @@
     {
       char *opts;
       
-      if(opts = strchr(name, '/'))
+      if(opts = (char*)strchr(name, '/'))
       {
         *opts++ = '\0';
       }
@@ -728,7 +728,7 @@
     {
       char *destination;
 
-      if( set || ( destination = strchr( argv[optind], '+' ) ) == NULL )
+      if( set || ( destination = (char*)strchr( argv[optind], '+' ) ) == NULL )
       {
         fprintf( stderr, PROG_NAME " error: unknown parameter: %s\n", argv[optind]);
         throw QuietException();
openSUSE Build Service is sponsored by