diff options
author | Brian Paul <[email protected]> | 2012-09-06 08:16:08 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-09-06 18:58:49 -0600 |
commit | 14f55869a4f9d54442aa4e10089ba1e5ec211b37 (patch) | |
tree | 99b79c0c7be1b73fad67fb29c8b6521c5cb5638e /src/glx/dri2.c | |
parent | 815d9d405c69bb07d550ae9f79283dcdc7466e2c (diff) |
glx: move 'prime' var into #ifdef'd code block
To silence unused var warning.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/glx/dri2.c')
-rw-r--r-- | src/glx/dri2.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/glx/dri2.c b/src/glx/dri2.c index 1214cb47a78..e17da6f7fc2 100644 --- a/src/glx/dri2.c +++ b/src/glx/dri2.c @@ -269,7 +269,6 @@ DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName) XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2ConnectReply rep; xDRI2ConnectReq *req; - char *prime; XextCheckExtension(dpy, info, dri2ExtensionName, False); @@ -281,13 +280,16 @@ DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName) req->driverType = DRI2DriverDRI; #ifdef DRI2DriverPrimeShift - prime = getenv("DRI_PRIME"); - if (prime) { - uint32_t primeid; - errno = 0; - primeid = strtoul(prime, NULL, 0); - if (errno == 0) - req->driverType |= ((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift); + { + char *prime = getenv("DRI_PRIME"); + if (prime) { + uint32_t primeid; + errno = 0; + primeid = strtoul(prime, NULL, 0); + if (errno == 0) + req->driverType |= + ((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift); + } } #endif |