[Intel-gfx] [PATCH 2/2] drm/i915: drop unnecessary local variable to suppress build warning

Chris Wilson chris at chris-wilson.co.uk
Sun Aug 11 11:50:17 CEST 2013


On Sun, Aug 11, 2013 at 12:44:02PM +0300, Jani Nikula wrote:
> Although I could not reproduce this (different compiler version,
> perhaps), reportedly we get:
> 
> drivers/gpu/drm/i915/i915_irq.c:1943:27: warning: ‘score’ may be used
> uninitialized in this function [-Wuninitialized]
> 
> Drop the 'score' variable altogether as it's not really needed.

Right, it was only there because I thought the switch was more readable
with the temporary.
 
> Reported-by: Kees Cook <keescook at chromium.org>
Go fix your compiler!

> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Both patches
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list