Mesa (master): glut: Silence uninitialized variable warning.
Vinson Lee
vlee at kemper.freedesktop.org
Sun Feb 14 21:48:36 UTC 2010
Module: Mesa
Branch: master
Commit: e7660a54423c69fe352e21eedd2a082d9c7aeac0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7660a54423c69fe352e21eedd2a082d9c7aeac0
Author: Vinson Lee <vlee at vmware.com>
Date: Sun Feb 14 13:47:58 2010 -0800
glut: Silence uninitialized variable warning.
---
src/glut/glx/glut_cmap.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/glut/glx/glut_cmap.c b/src/glut/glx/glut_cmap.c
index e8d9e1f..e6cb742 100644
--- a/src/glut/glx/glut_cmap.c
+++ b/src/glut/glx/glut_cmap.c
@@ -348,7 +348,7 @@ __glutEstablishColormapsProperty(GLUTwindow * window)
Window *winlist;
Colormap *cmaplist;
Status status;
- int maxcmaps, num;
+ int maxcmaps, num, i;
assert(!window->parent);
maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay,
@@ -357,6 +357,9 @@ __glutEstablishColormapsProperty(GLUTwindow * window)
and cmaplist, but we could. */
winlist = (Window *) malloc(maxcmaps * sizeof(Window));
cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap));
+ for (i = 0; i < maxcmaps; i++) {
+ cmaplist[i] = 0;
+ }
num = findColormaps(window, winlist, cmaplist, 0, maxcmaps);
if (num < 2) {
/* Property no longer needed; remove it. */
More information about the mesa-commit
mailing list