From 499e38ff983ed594908db27c7a6d63dd3b5cffc1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 11 Mar 2015 17:47:30 +0000 Subject: [PATCH] Warning fixes git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14779 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgPlugins/exr/ReaderWriterEXR.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/exr/ReaderWriterEXR.cpp b/src/osgPlugins/exr/ReaderWriterEXR.cpp index d06e32f91..9cfc5bffb 100644 --- a/src/osgPlugins/exr/ReaderWriterEXR.cpp +++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp @@ -24,7 +24,7 @@ using namespace Imath; /**************************************************************************** * * Follows is code written by FOI (www.foi.se) - * it is a wraper of openEXR(www.openexr.com) + * it is a wrapper of openEXR(www.openexr.com) * to add suport of exr images into osg * * Ported to a OSG-plugin, Ragnar Hammarqvist. @@ -92,7 +92,7 @@ unsigned char *exr_load(std::istream& fin, unsigned char *buffer=NULL; // returned to sender & as read from the disk bool inputError = false; Array2D pixels; - int width,height,numComponents; + int width=0,height=0,numComponents; try { @@ -111,6 +111,7 @@ unsigned char *exr_load(std::istream& fin, rgbafile.readPixels(dw.min.y, dw.max.y); } catch( char * str ) { + OSG_WARN << "exr_load error : " << str << std::endl; inputError = true; } @@ -335,6 +336,7 @@ protected: } catch( char * str ) { + OSG_WARN << "writeEXRStream error : " << str << std::endl; writeOK = false; }