[Mesa-dev] [PATCH] mesa: silence MinGW 'may be unused uninitialized' warning in get.c
Neha Bhende
bhenden at vmware.com
Fri Jan 26 17:41:38 UTC 2018
Reviewed-by: Neha Bhende<bhenden at vmware.com>
Regards,
Neha
________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Thursday, January 25, 2018 4:29:05 PM
To: mesa-dev at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende
Subject: [PATCH] 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.
---
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 7f2d72a..5fee9a6 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";
--
2.7.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180126/e13f1f66/attachment.html>
More information about the mesa-dev
mailing list