mesa: fix some potential uninitialized memory references
authorBrian Paul <brianp@vmware.com>
Thu, 13 Aug 2009 19:44:31 +0000 (13:44 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 13 Aug 2009 19:44:31 +0000 (13:44 -0600)
src/mesa/main/fog.c
src/mesa/main/light.c

index 50a61bd84bff8bfac1cdfc7306be2a7a3b92062e..4323d3db8206a19c57a038f482e67164bd57d04d 100644 (file)
@@ -67,7 +67,7 @@ _mesa_Fogiv(GLenum pname, const GLint *params )
         break;
       default:
          /* Error will be caught later in _mesa_Fogfv */
-         ;
+         ASSIGN_4V(p, 0.0F, 0.0F, 0.0F, 0.0F);
    }
    _mesa_Fogfv(pname, p);
 }
index ac604fd12cc55f1dc0675c55f23c5169deb94236..17034680addaed01933ae0327f13e321e4bb37f0 100644 (file)
@@ -496,7 +496,7 @@ _mesa_LightModeliv( GLenum pname, const GLint *params )
          break;
       default:
          /* Error will be caught later in gl_LightModelfv */
-         ;
+         ASSIGN_4V(fparam, 0.0F, 0.0F, 0.0F, 0.0F);
    }
    _mesa_LightModelfv( pname, fparam );
 }