diff options
author | Vinson Lee <vlee@vmware.com> | 2010-02-14 13:47:58 -0800 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-11 20:05:26 +0100 |
commit | 105435fb95b39eb2226deed1e963bc8456179a0f (patch) | |
tree | 0b3fee5c6fb2b9694db2d1d6dcc19f611ae34e92 | |
parent | b917ef9f1a15ccfc405b584c7f8bdf5371a8f32d (diff) | |
download | glut-105435fb95b39eb2226deed1e963bc8456179a0f.tar.gz |
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 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. */ |