Re: [PATCH] Fix unitialized warning on gdb/typeprint.c:whatis_exp

Eli Zaretskii
2018-01-17T15:34:29Z

> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,
> Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Tue, 16 Jan 2018 15:32:39 -0500
>
> This simple patch initializes "struct value *val" to NULL, which
> silences a when compiling GDB with certain GCC versions.
>
> This warning is technically incorrect, because there is now way that
> "val" will be used unitialized if you look at the code flow, but it's
> a simple "fix" and doesn't do any harm.

This fixes the warning for me (of course).

Thanks.