[Mesa-dev] [PATCH] intel: avoid undefined variable warnings in intel_screen.c

Matt Turner mattst88 at gmail.com
Wed Sep 5 10:49:06 PDT 2012


On Wed, Sep 5, 2012 at 10:39 AM, Paul Berry <stereotype441 at gmail.com> wrote:
> ---
>  src/mesa/drivers/dri/intel/intel_screen.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
> index 3470db6..ca6ac34 100644
> --- a/src/mesa/drivers/dri/intel/intel_screen.c
> +++ b/src/mesa/drivers/dri/intel/intel_screen.c
> @@ -778,11 +778,12 @@ intelCreateContext(gl_api api,
>                    unsigned *error,
>                     void *sharedContextPrivate)
>  {
> -   __DRIscreen *sPriv = driContextPriv->driScreenPriv;
> -   struct intel_screen *intelScreen = sPriv->driverPrivate;
>     bool success = false;
>
>  #ifdef I915
> +   __DRIscreen *sPriv = driContextPriv->driScreenPriv;
> +   struct intel_screen *intelScreen = sPriv->driverPrivate;
> +
>     if (IS_9XX(intelScreen->deviceID)) {
>        success = i915CreateContext(api, mesaVis, driContextPriv,
>                                    major_version, minor_version, error,
> --
> 1.7.7.6

I see this every time I compile and always meant to look at it.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list