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
@@ -198,7 +198,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