This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Adhemerval,i get the warning: ‘resplen’ may be used uninitialized in this function [-Wmaybe-uninitialized] on s390, too.
This patch disables Wmaybe-uninitialized warning on s390x with gcc 4.8, 4.9 and gcc from today, but not on power.
Please test if it fixes your warnings too. Bye Stefan --- 2014-12-11 Stefan Liebler <stli@linux.vnet.ibm.com> resolv/res_send.c (send_vc): Disable warning resplen may be used uninitialized. On 12/11/2014 12:42 AM, Adhemerval Zanella wrote:
On 10-12-2014 19:22, Joseph Myers wrote:On Wed, 10 Dec 2014, Adhemerval Zanella wrote:The 'resolv/res_send.c' build with _STRING_ARCH_unaligned not defined may utilize the local resplen uninitialized. This patch sets it to 0.Do you have an actual path through the function that can result in it being used uninitialized, and where a value of 0 is correct?I do not, I used as default just to avoid the warning.My understanding, as described in <https://sourceware.org/ml/libc-alpha/2014-11/msg00693.html>, was that this is a false positive warning - the variable is never actually used uninitialized, but determining that requires considering the values other variables can have on the paths leading to resplen being used. And since we don't want to add initializations (to installed code as opposed to testcases) that actually require code to be generated simply in order to avoid warnings, that may indicate disabling -Wmaybe-uninitialized around the code that generates the warning.I understand the idea of avoid such warning, I will the compiler directives.
Attachment:
res_send_11122014
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |