[Mesa-dev] [PATCH] nir: Silence GCC maybe-uninitialized warnings.
Connor Abbott
cwabbott0 at gmail.com
Mon Nov 2 09:30:06 PST 2015
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>
On Mon, Nov 2, 2015 at 4:30 AM, Vinson Lee <vlee at freedesktop.org> wrote:
> nir/nir_control_flow.c: In function ‘split_block_cursor.isra.11’:
> nir/nir_control_flow.c:460:15: warning: ‘after’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> *_after = after;
> ^
> nir/nir_control_flow.c:458:16: warning: ‘before’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> *_before = before;
> ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/glsl/nir/nir_control_flow.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c
> index 7f51c4f..96395a4 100644
> --- a/src/glsl/nir/nir_control_flow.c
> +++ b/src/glsl/nir/nir_control_flow.c
> @@ -452,6 +452,9 @@ split_block_cursor(nir_cursor cursor,
> before = split_block_before_instr(nir_instr_next(cursor.instr));
> }
> break;
> +
> + default:
> + unreachable("not reached");
> }
>
> if (_before)
> --
> 2.6.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list