diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2019-07-02 14:07:44 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2019-07-02 14:07:44 +0200 |
commit | d1bc2cbbed9aea2017ef941f63c8786571da5b4f (patch) | |
tree | eb77d636ea206639a5ea99ce0f37e223a954e163 /ChangeLog | |
parent | 72edea80c1bb402f41d8bca58c835abf46dadd48 (diff) | |
download | glibc-d1bc2cbbed9aea2017ef941f63c8786571da5b4f.zip glibc-d1bc2cbbed9aea2017ef941f63c8786571da5b4f.tar.gz glibc-d1bc2cbbed9aea2017ef941f63c8786571da5b4f.tar.bz2 |
Fix build warnings in resolv/res_send.c
This patch fixes the gcc warnings seen with gcc 9 -march>=z13 on s390x:
res_send.c: In function ‘__res_context_send’:
res_send.c:498:7: error: ‘resplen’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
498 | if (n == 0 && (buf2 == NULL || *resplen2 == 0))
| ^
In this case send_vc is inlined into __res_context_send
and the maybe uninitialized resplen belongs to the one in send_vc.
In send_vc there is already a DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized")
and a comment which explains that this is a false-positive.
Note that resplen is used as return value.
This patch adds a further DIAG_IGNORE_NEEDS_COMMENT around the declaration of n
in __res_context_send and the comparison after n was set to the return value of send_vc.
ChangeLog:
* resolv/res_send.c (__res_context_send): Disable maybe-uninitialized
warning.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2019-07-02 Stefan Liebler <stli@linux.ibm.com> + + * resolv/res_send.c (__res_context_send): Disable maybe-uninitialized + warning. + 2019-07-01 Florian Weimer <fweimer@redhat.com> * scripts/build-many-glibcs.py (Context.add_all_configs): Add v4t |