Commit cd74ede9 authored by jcfr's avatar jcfr

COMP: Fix -Wcatch-value and -Wunused-variable warnings

- Catch by value exception in `Testing/VTKITKVectorReader.cxx`

```cpp
warning: catching polymorphic type ‘class itk::ExceptionObject’ by value [-Wcatch-value=]
```

- unused variable in vtkAddon/vtkOpenGLShaderComputation.cxx

```cpp
/Libs/vtkAddon/vtkOpenGLShaderComputation.cxx:423:10: warning: unused variable ‘status’ [-Wunused-variable]
   GLenum status;
          ^~~~~~
```

From: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@27994 3bd1e089-480b-0410-8dfb-8563597acbee
parent 3be2c3f8
......@@ -420,7 +420,6 @@ void vtkOpenGLShaderComputation::Compute(float slice)
//
// Does the GPU support current Framebuffer configuration?
//
GLenum status;
if (!this->FramebufferComplete())
{
vtkErrorMacro("Framebuffer is not complete.");
......
......@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
{
vectorReader->Update();
}
catch (itk::ExceptionObject err)
catch (itk::ExceptionObject &err)
{
std::cout << "Unable to read file '" << argv[1] << "', err = \n" << err << std::endl;
vectorReader->Delete();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment