Re: [Mesa-dev] [PATCH] i965: quieten compiler warning about out-of-bounds access

2016-01-06 Thread Ilia Mirkin
On Tue, Jan 5, 2016 at 8:30 PM, Jason Ekstrand wrote: > > On Jan 4, 2016 8:30 PM, "Ilia Mirkin" wrote: >> >> gcc 4.9.3 shows the following error: >> >> brw_vue_map.c:260:20: warning: array subscript is above array bounds >> [-Warray-bounds] >>

Re: [Mesa-dev] [PATCH] i965: quieten compiler warning about out-of-bounds access

2016-01-05 Thread Timothy Arceri
Reviewed-by: Timothy Arceri ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965: quieten compiler warning about out-of-bounds access

2016-01-05 Thread Jason Ekstrand
On Jan 4, 2016 8:30 PM, "Ilia Mirkin" wrote: > > gcc 4.9.3 shows the following error: > > brw_vue_map.c:260:20: warning: array subscript is above array bounds > [-Warray-bounds] > return brw_names[slot - VARYING_SLOT_MAX]; > > This is because BRW_VARYING_SLOT_COUNT is a

[Mesa-dev] [PATCH] i965: quieten compiler warning about out-of-bounds access

2016-01-04 Thread Ilia Mirkin
gcc 4.9.3 shows the following error: brw_vue_map.c:260:20: warning: array subscript is above array bounds [-Warray-bounds] return brw_names[slot - VARYING_SLOT_MAX]; This is because BRW_VARYING_SLOT_COUNT is a valid value for the enum type. Adding an assert will generate no additional code