[Mesa-dev] Mesa (master): i915: Silence unused variable warning in non-debug builds.
Kenneth Graunke
kenneth at whitecape.org
Tue Oct 12 00:00:23 PDT 2010
On Monday 11 October 2010 16:17:51 Ian Romanick wrote:
[snip]
> > diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c
> > b/src/mesa/drivers/dri/i915/i915_vtbl.c index d7828a2..8fa24e4 100644
> > --- a/src/mesa/drivers/dri/i915/i915_vtbl.c
> > +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
> > @@ -669,6 +669,7 @@ i915_assert_not_dirty( struct intel_context *intel )
> >
> > struct i915_context *i915 = i915_context(&intel->ctx);
> > GLuint dirty = get_dirty(&i915->state);
> > assert(!dirty);
> >
> > + (void) dirty;
>
> This should probably be changed to 'assert(!get_dirty(&i915->state))'
> instead.
I don't think this is equivalent---get_dirty has side-effects. Moving the call
inside the assert would mean these side effects would not occur in release
builds.
More information about the mesa-dev
mailing list