mesa: initialize variables to silence compiler warnings
authorBrian Paul <brianp@vmware.com>
Wed, 22 Jul 2015 00:42:41 +0000 (18:42 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 24 Jul 2015 02:19:50 +0000 (20:19 -0600)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/fbobject.c
src/mesa/main/shaderapi.c

index f46554b761e5285e42b1dac1d83a3d580d55d4b5..cc342c23c03beb00d8ec981b8d5485adc31b37c7 100644 (file)
@@ -3304,7 +3304,7 @@ _mesa_FramebufferTexture(GLenum target, GLenum attachment,
    GET_CURRENT_CONTEXT(ctx);
    struct gl_framebuffer *fb;
    struct gl_texture_object *texObj;
-   GLboolean layered;
+   GLboolean layered = GL_FALSE;
 
    const char *func = "FramebufferTexture";
 
@@ -3347,7 +3347,7 @@ _mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment,
    GET_CURRENT_CONTEXT(ctx);
    struct gl_framebuffer *fb;
    struct gl_texture_object *texObj;
-   GLboolean layered;
+   GLboolean layered = GL_FALSE;
 
    const char *func = "glNamedFramebufferTexture";
 
index 34d280a6fbaaca3f93ac08dbb203d58fa3733a98..b86f22ef9c53a006d8f358101962b270a6ce9614 100644 (file)
@@ -1432,7 +1432,7 @@ void GLAPIENTRY
 _mesa_GetObjectParameterfvARB(GLhandleARB object, GLenum pname,
                               GLfloat *params)
 {
-   GLint iparams[1];  /* XXX is one element enough? */
+   GLint iparams[1] = {0};  /* XXX is one element enough? */
    _mesa_GetObjectParameterivARB(object, pname, iparams);
    params[0] = (GLfloat) iparams[0];
 }