Mesa (master): mesa: silence MinGW 'may be unused uninitialized' warning in get.c

Brian Paul brianp at kemper.freedesktop.org
Fri Jan 26 17:44:49 UTC 2018


Module: Mesa
Branch: master
Commit: acaec6cdd9e65cd2daf4d6a6bb78a909cf9c306c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=acaec6cdd9e65cd2daf4d6a6bb78a909cf9c306c

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Jan 25 14:37:34 2018 -0700

mesa: silence MinGW 'may be unused uninitialized' warning in get.c

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 at vmware.com>

---

 src/mesa/main/get.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7f2d72aa4b..5fee9a60bc 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -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";
 




More information about the mesa-commit mailing list