diff options
author | Maciej Cencora <m.cencora@gmail.com> | 2009-11-23 22:14:48 +0100 |
---|---|---|
committer | Maciej Cencora <m.cencora@gmail.com> | 2009-11-23 22:14:48 +0100 |
commit | 5173d14cb5821637f22247d16be1b970f3762d6a (patch) | |
tree | e93826ec799fdbe513592e253278545e2584a7bf /progs/xdemos | |
parent | 18384af7491c408c4182b72807b02c11b55509f8 (diff) | |
parent | 960464e42dce138fde11c379ce7744bc4be14aa2 (diff) |
Merge commit 'origin/mesa_7_7_branch'
Diffstat (limited to 'progs/xdemos')
-rw-r--r-- | progs/xdemos/corender.c | 1 | ||||
-rw-r--r-- | progs/xdemos/glxinfo.c | 6 | ||||
-rw-r--r-- | progs/xdemos/glxpbdemo.c | 1 | ||||
-rw-r--r-- | progs/xdemos/pbdemo.c | 1 | ||||
-rw-r--r-- | progs/xdemos/pbinfo.c | 1 | ||||
-rw-r--r-- | progs/xdemos/sharedtex_mt.c | 8 |
6 files changed, 11 insertions, 7 deletions
diff --git a/progs/xdemos/corender.c b/progs/xdemos/corender.c index ca8ee1eed3..8c70535482 100644 --- a/progs/xdemos/corender.c +++ b/progs/xdemos/corender.c @@ -55,6 +55,7 @@ setup_ipc(void) printf("Waiting for connection from another 'corender'\n"); Sock = AcceptConnection(k); + assert(Sock != -1); printf("Got connection, sending windowID\n"); diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index 445d3ea94b..b182a3091d 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -427,8 +427,6 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) int nConfigs; if (!visinfo) - configs = glXChooseFBConfig(dpy, scrnum, fbAttribSingle, &nConfigs); - if (!visinfo) configs = glXChooseFBConfig(dpy, scrnum, fbAttribDouble, &nConfigs); if (configs) { @@ -964,8 +962,10 @@ print_fbconfig_info(Display *dpy, int scrnum, InfoMode mode) /* get list of all fbconfigs on this screen */ fbconfigs = glXGetFBConfigs(dpy, scrnum, &numFBConfigs); - if (numFBConfigs == 0) + if (numFBConfigs == 0) { + XFree(fbconfigs); return; + } printf("%d GLXFBConfigs:\n", numFBConfigs); if (mode == Normal) diff --git a/progs/xdemos/glxpbdemo.c b/progs/xdemos/glxpbdemo.c index 91fd30dcaa..ecf318ec6a 100644 --- a/progs/xdemos/glxpbdemo.c +++ b/progs/xdemos/glxpbdemo.c @@ -106,6 +106,7 @@ MakePbuffer( Display *dpy, int screen, int width, int height ) if (0 == nConfigs || !fbConfigs) { printf("Error: glxChooseFBConfig failed\n"); + XFree(fbConfigs); XCloseDisplay(dpy); return 0; } diff --git a/progs/xdemos/pbdemo.c b/progs/xdemos/pbdemo.c index 2573209336..277df72924 100644 --- a/progs/xdemos/pbdemo.c +++ b/progs/xdemos/pbdemo.c @@ -131,6 +131,7 @@ MakePbuffer( Display *dpy, int screen, int width, int height ) fbConfigs = ChooseFBConfig(dpy, screen, fbAttribs[attempt], &nConfigs); if (nConfigs==0 || !fbConfigs) { printf("Note: glXChooseFBConfig(%s) failed\n", fbString[attempt]); + XFree(fbConfigs); continue; } diff --git a/progs/xdemos/pbinfo.c b/progs/xdemos/pbinfo.c index b43adf1bb7..edfa9c1f3b 100644 --- a/progs/xdemos/pbinfo.c +++ b/progs/xdemos/pbinfo.c @@ -27,6 +27,7 @@ PrintConfigs(Display *dpy, int screen, Bool horizFormat) fbConfigs = GetAllFBConfigs(dpy, screen, &nConfigs); if (!nConfigs || !fbConfigs) { printf("Error: glxGetFBConfigs failed\n"); + XFree(fbConfigs); return; } diff --git a/progs/xdemos/sharedtex_mt.c b/progs/xdemos/sharedtex_mt.c index 07c1bfcc38..f924448cc4 100644 --- a/progs/xdemos/sharedtex_mt.c +++ b/progs/xdemos/sharedtex_mt.c @@ -447,7 +447,7 @@ main(int argc, char *argv[]) const char *dpyName = XDisplayName(NULL); pthread_t t0, t1, t2, t3; struct thread_init_arg tia0, tia1, tia2, tia3; - struct window *h0, *h1, *h2, *h3; + struct window *h0; XInitThreads(); @@ -462,9 +462,9 @@ main(int argc, char *argv[]) /* four windows and contexts sharing display lists and texture objects */ h0 = AddWindow(gDpy, dpyName, 10, 10, gCtx); - h1 = AddWindow(gDpy, dpyName, 330, 10, gCtx); - h2 = AddWindow(gDpy, dpyName, 10, 350, gCtx); - h3 = AddWindow(gDpy, dpyName, 330, 350, gCtx); + (void) AddWindow(gDpy, dpyName, 330, 10, gCtx); + (void) AddWindow(gDpy, dpyName, 10, 350, gCtx); + (void) AddWindow(gDpy, dpyName, 330, 350, gCtx); if (!glXMakeCurrent(gDpy, h0->Win, gCtx)) { Error(dpyName, "glXMakeCurrent failed for init thread."); |