This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix unitialized warning on gdb/typeprint.c:whatis_exp
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 17 Jan 2018 17:34:17 +0200
- Subject: Re: [PATCH] Fix unitialized warning on gdb/typeprint.c:whatis_exp
- Authentication-results: sourceware.org; auth=none
- References: <87po69zkxe.fsf@redhat.com> <20180116203239.27787-1-sergiodj@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.