diff options
author | Paul Berry <[email protected]> | 2012-01-09 11:24:17 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-01-11 07:57:56 -0800 |
commit | 765ed3a6a9317607311bac1dcb0edee13ebcee16 (patch) | |
tree | 809c4624616b289abd0568a525b8562d6f7dfc42 /src/glx | |
parent | d3150ebc8c1833322daf24b2cd47e31a5b2f8a1f (diff) |
glx: Suppress unused variable warning for cmdlen
No functional change. In the function
__indirect_glAreTexturesResident(), the variable cmdlen is only used
if USE_XCB is not defined. This patch avoids a compile warning in the
event that USE_XCB is defined.
v2: just move cmdlen declaration inside the #else part.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/single2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/single2.c b/src/glx/single2.c index 66281fa9c99..259c4fec1ff 100644 --- a/src/glx/single2.c +++ b/src/glx/single2.c @@ -887,7 +887,6 @@ __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, struct glx_context *const gc = __glXGetCurrentContext(); Display *const dpy = gc->currentDpy; GLboolean retval = (GLboolean) 0; - const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { #ifdef USE_XCB xcb_connection_t *c = XGetXCBConnection(dpy); @@ -903,6 +902,7 @@ __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, retval = reply->ret_val; free(reply); #else + const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); GLubyte const *pc = __glXSetupSingleRequest(gc, X_GLsop_AreTexturesResident, cmdlen); (void) memcpy((void *) (pc + 0), (void *) (&n), 4); |