[PATCH] avoid GCC 10 test suite warnings (BZ #25219)

Martin Sebor msebor@gmail.com
Mon May 11 15:33:16 GMT 2020


On 5/8/20 10:04 AM, Florian Weimer wrote:
> * Martin Sebor via Libc-alpha:
> 
>> +
>> +#if __GNUC_PREREQ (7, 0)
>> +  DIAG_PUSH_NEEDS_COMMENT;
>> +  /* Avoid warnings about the second (size) argument being excessive.  */
>> +  DIAG_IGNORE_NEEDS_COMMENT (10.1, "-Wstringop-overflow");
>> +#endif
>>     fails |= test_wrp (EINVAL, readlink, "/", buf, -1);
>> +#if __GNUC_PREREQ (7, 0)
>> +  DIAG_POP_NEEDS_COMMENT;
>> +#endif
> 
> I'd suggest to use
> 
>      fails |= test_wrp (EINVAL, readlink, "/", buf, sizeof (buf));
> 
> here, for the reason you explained.

Sounds good.  I will commit the attached patch unless there are more
suggestions for changes.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-25219-test-fallout.diff
Type: text/x-patch
Size: 3418 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20200511/99a17f55/attachment-0001.bin>


More information about the Libc-alpha mailing list