diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2016-08-26 17:33:47 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2016-08-26 17:33:47 -0300 |
commit | 21e79af4cf72429f98480fa34912a4ce236b09a0 (patch) | |
tree | 1a901ba7cb48d7c36c0b2b6a129c2d01d61f314d /stdlib/tst-bsearch.c | |
parent | 5a7ac040efe94f8c49c5ec95c90ad6baf3b37744 (diff) | |
download | glibc-21e79af4cf72429f98480fa34912a4ce236b09a0.tar.gz glibc-21e79af4cf72429f98480fa34912a4ce236b09a0.tar.xz glibc-21e79af4cf72429f98480fa34912a4ce236b09a0.zip |
Fix test-skeleton C99 designed initialization
ISO C forbids empty initializer braces (6.7.9 initializer-list must contain at least one initializer). However GCC allows it, generating a warning depending of the version. With GCC 4.8 on ARM I noticed tst-initializers1.c fails to build with: In file included from tst-initializers1.c:60:0: ../test-skeleton.c: In function 'delayed_exit_thread': ../test-skeleton.c:687:10: error: missing initializer for field 'tv_sec' of 'struct timespec' [-Werror=missing-field-initializers] struct timespec remaining = {} While with GCC 5.1 the same warning is just spilled with -pedantic. To be safe this patch just zero initialize the struct as expected. Tested on armhf. * test-skeleton.c (delayed_exit_thread): Add initializer on struct timespec C99 designated initialization.
Diffstat (limited to 'stdlib/tst-bsearch.c')
0 files changed, 0 insertions, 0 deletions