diff --git a/simgear/scene/viewer/Compositor.cxx b/simgear/scene/viewer/Compositor.cxx index c229b49a..c4bdc88f 100644 --- a/simgear/scene/viewer/Compositor.cxx +++ b/simgear/scene/viewer/Compositor.cxx @@ -177,7 +177,8 @@ Compositor::update(const osg::Matrix &view_matrix, SGGeod camera_pos_geod = SGGeod::fromCart( SGVec3d(camera_pos.x(), camera_pos.y(), camera_pos.z())); - double left, right, bottom, top, zNear, zFar; + double left = 0.0, right = 0.0, bottom = 0.0, top = 0.0, + zNear = 0.0, zFar = 0.0; proj_matrix.getFrustum(left, right, bottom, top, zNear, zFar); osg::Matrixf prev_view_matrix, prev_view_matrix_inv; diff --git a/simgear/scene/viewer/CompositorPass.cxx b/simgear/scene/viewer/CompositorPass.cxx index d1d23303..9cdb2c35 100644 --- a/simgear/scene/viewer/CompositorPass.cxx +++ b/simgear/scene/viewer/CompositorPass.cxx @@ -502,7 +502,8 @@ public: // Calculate the light's point of view transformation matrices. // Taken from Project Rembrandt. - double left, right, bottom, top, zNear, zFar; + double left = 0.0, right = 0.0, bottom = 0.0, top = 0.0, + zNear = 0.0, zFar = 0.0; proj_matrix.getFrustum(left, right, bottom, top, zNear, zFar); osg::BoundingSphere bs;