[Intel-gfx] [PATCH] drm/i915: avoid "may be used uninitialised" warnings

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 25 16:40:28 UTC 2016


On Mon, Jul 25, 2016 at 05:29:45PM +0100, Dave Gordon wrote:
> gcc is getting false positives in its detection of uninitialised values.
> Specifically it thinks 'gtt_entry' can be used in a WARN_ON() macro
> without previously being assigned (the assigment is inside a conditional
> loop), bu actually the WARN_ON() can only be reached if the assignment
> has also been executed at least once.

gcc 4.7 through 6.1 doesn't generate the warning for me, and the
kbuilder can happily ignore it.

At any rate the markup is uninitialised_var().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list