This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Get rid of Werror=maybe-uninitialized in res_send.c.
- From: Siddhesh Poyarekar <siddhesh at gotplt dot org>
- To: Stefan Liebler <stli at linux dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 20 Jan 2020 13:57:40 +0530
- Subject: Re: [PATCH] Get rid of Werror=maybe-uninitialized in res_send.c.
- References: <03d65724-d69b-d553-18a5-dece072e5a45@linux.ibm.com>
On 03/12/19 2:20 pm, Stefan Liebler wrote:
> Hi,
>
> the commit 446997ff1433d33452b81dfa9e626b8dccf101a4 introduced
> this new usage of resplen. If build with gcc 9 -march>=z13 on s390x,
> the following warning occurs:
> res_send.c: In function ‘__res_context_send’:
> res_send.c:539:6: error: ‘resplen’ may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
> 539 | if (resplen > HFIXEDSZ)
> | ^
>
> Therefore this patch adds a further DIAG_IGNORE_NEEDS_COMMENT in the
> same way as it was previously done for usages of resplen or n.
> See commit d1bc2cbbed9aea2017ef941f63c8786571da5b4f.
This is fine. OK to commit to master.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
PS: Please send patches inline (using git send-email) since it's easier
to add review comments that way.