Mesa (master): glx: use a block to fix declarations after code warning

Brian Paul brianp at kemper.freedesktop.org
Fri Aug 19 07:36:45 PDT 2011


Module: Mesa
Branch: master
Commit: e975e18bebb54b20f00c568e7870932402b79f8f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e975e18bebb54b20f00c568e7870932402b79f8f

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Aug 19 08:36:22 2011 -0600

glx: use a block to fix declarations after code warning

---

 src/glx/glxcmds.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index fc0a079..c8ec9c2 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -794,15 +794,17 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
    gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
-   __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
+   {
+      __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
 
-   if (pdraw != NULL) {
-      if (gc && drawable == gc->currentDrawable) {
-	 glFlush();
-      }
+      if (pdraw != NULL) {
+         if (gc && drawable == gc->currentDrawable) {
+            glFlush();
+         }
 
-      (*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 0, 0);
-      return;
+         (*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 0, 0);
+         return;
+      }
    }
 #endif
 



More information about the mesa-commit mailing list