[Intel-gfx] [PATCH 1/2] drm/i915: [dinq] Fix six instances of -Warray-bounds

Daniel Vetter daniel at ffwll.ch
Wed Feb 15 14:57:00 CET 2012


On Wed, Feb 15, 2012 at 02:42:42PM +0100, Ben Widawsky wrote:
> Introduced in commits c1cd90ed and d27b1e0e
> 
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

This one smells like gcc being stupid - it's in a static function an gcc
sees all the callsites and we only pass in a const ring argument. I'll
drop that one.

The other one is a bit more fishy, but we do check args->size == 0 before
calling into these functions, so we will execute the loop at least once
and hence is guaranteed to be initialized. It's harder to check, so gcc
has a point here. But this code is scheduled to get completely rewritten
anyway, so I'll drop this one, too. I'll re-send the new code in a few
days or so.

Cheers, Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list