Mesa (8.0): egl: fix uninitialized values
Dylan Noblesmith
nobled at kemper.freedesktop.org
Sun Apr 29 11:25:19 UTC 2012
Module: Mesa
Branch: 8.0
Commit: 4dd228a0a9b6c2e2c242eb29f82c7660f94e80e2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4dd228a0a9b6c2e2c242eb29f82c7660f94e80e2
Author: Dylan Noblesmith <nobled at dreamwidth.org>
Date: Sun Apr 1 18:48:13 2012 +0000
egl: fix uninitialized values
Noticed by clang:
eglimage.c:48:28: warning: argument to 'sizeof' in 'memset' call is
the same expression as the destination; did you mean to dereference
it? [-Wsizeof-pointer-memaccess]
memset(attrs, 0, sizeof(attrs));
~~~~~ ^~~~~
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit 071501a68129768c6223beb24f7363d87c6684ea)
---
src/egl/main/eglimage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index d5deae7..1174d0a 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -45,7 +45,7 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
(void) dpy;
- memset(attrs, 0, sizeof(attrs));
+ memset(attrs, 0, sizeof(*attrs));
attrs->ImagePreserved = EGL_FALSE;
attrs->GLTextureLevel = 0;
attrs->GLTextureZOffset = 0;
More information about the mesa-commit
mailing list