[vtk-developers] [PATCH] FIX: Use of uninitialized variable and use better error code

themiwi at gmail.com themiwi at gmail.com
Fri Dec 4 04:19:58 EST 2009


From: Michael Wild <themiwi at users.sourceforge.net>

Signed-off-by: Michael Wild <themiwi at users.sourceforge.net>
---
 VTK/IO/vtkOggTheoraWriter.cxx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/VTK/IO/vtkOggTheoraWriter.cxx b/VTK/IO/vtkOggTheoraWriter.cxx
index b0677f8..8416854 100644
--- a/VTK/IO/vtkOggTheoraWriter.cxx
+++ b/VTK/IO/vtkOggTheoraWriter.cxx
@@ -266,7 +266,7 @@ int vtkOggTheoraWriterInternal::Write(vtkImageData *id)
   // encode the frame from the last call.
   // have to do leap-frogging, because otherwise we can't
   // write the EOS page with the last frame in End().
-  int ret;
+  int ret = 1;
   if (this->haveImageData)
     {
     ret = this->EncodeFrame(this->thImage,0);
@@ -578,7 +578,7 @@ void vtkOggTheoraWriter::Write()
     {
     vtkErrorMacro("Error storing image.");
     this->Error = 1;
-    this->SetErrorCode(vtkErrorCode::OutOfDiskSpaceError);
+    this->SetErrorCode(vtkErrorCode::UnknownError);
     }
 }
 
-- 
1.6.5.2




More information about the vtk-developers mailing list