mesa: silence MinGW 'may be unused uninitialized' warning in get.c
authorBrian Paul <brianp@vmware.com>
Thu, 25 Jan 2018 21:37:34 +0000 (14:37 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 26 Jan 2018 17:44:05 +0000 (10:44 -0700)
The warning happens on line 2114 for the memcpy(data, p, size) call.
I'm not sure why that generates the warning but not the earlier use
of p in the code.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
src/mesa/main/get.c

index 7f2d72aa4bd276ed3236781ed9c9a50006cc78c0..5fee9a60bc323b739d2b7aac76344a7e3d4ccba9 100644 (file)
@@ -2051,7 +2051,7 @@ _mesa_GetUnsignedBytevEXT(GLenum pname, GLubyte *data)
    const struct value_desc *d;
    union value v;
    int shift;
-   void *p;
+   void *p = NULL;
    GLsizei size;
    const char *func = "glGetUnsignedBytevEXT";