[PATCH 2/5] glx: Can't mix declarations and code in X.org sources

Keith Packard keithp at keithp.com
Tue Dec 9 09:30:58 PST 2014


We're using compiler compatibility settings which generate warnings
when a variable is declared after the first statement.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 glx/clientinfo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/glx/clientinfo.c b/glx/clientinfo.c
index c5fef30..74ad919 100644
--- a/glx/clientinfo.c
+++ b/glx/clientinfo.c
@@ -36,13 +36,14 @@ set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req,
     ClientPtr client = cl->client;
     char *gl_extensions;
     char *glx_extensions;
+    int size;
 
     REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
 
     /* Verify that the size of the packet matches the size inferred from the
      * sizes specified for the various fields.
      */
-    int size = sz_xGLXSetClientInfoARBReq;
+    size = sz_xGLXSetClientInfoARBReq;
     size = safe_add(size, safe_mul(req->numVersions, bytes_per_version));
     size = safe_add(size, safe_pad(req->numGLExtensionBytes));
     size = safe_add(size, safe_pad(req->numGLXExtensionBytes));
-- 
2.1.3



More information about the xorg-devel mailing list