diff options
author | Vinson Lee <[email protected]> | 2010-02-14 13:47:58 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-02-14 13:47:58 -0800 |
commit | e7660a54423c69fe352e21eedd2a082d9c7aeac0 (patch) | |
tree | 82c05eb7773c3a002efaf23be11ef99cb04fe19c | |
parent | 0b58d029b936fb9e3b30f157b554b9bc29f72f6d (diff) |
glut: Silence uninitialized variable warning.
-rw-r--r-- | 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 e8d9e1f01bf..e6cb742cfec 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. */ |