bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-verify.c: avoid -Wmissing-declarations warnings


From: Bernhard Voelker
Subject: Re: test-verify.c: avoid -Wmissing-declarations warnings
Date: Mon, 2 Nov 2020 02:35:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 10/31/20 7:09 PM, Bruno Haible wrote:
> In a gnulib testdir, I now see this warning:
> 
> In file included from ../../gltests/test-verify.c:22:0:
> ../../gltests/test-verify.c: In function ‘main’:
> ../../gltests/../gllib/verify.h:316:25: warning: ‘((unsigned char*)&s)[0]’ is 
> used uninitialized in this function [-Wuninitialized]
>  # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
>                          ^
> ../../gltests/test-verify.c:115:9: note: ‘s’ was declared here
>    state s;
>          ^
> 
> This is with gcc-5.4.0 and CPPFLAGS="-Wall".

Hi Bruno,

thanks for the report.
Sorry, I didn't test with such old GCC.
Should be fixed with the attached patch - I didn't find a gcc-5.*
on the compile farm (cfarm.tetaneutral.net).

Have a nice day,
Berny

Attachment: 0001-verify-tests-Fix-Wuninitialized-warning-regression-2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]