This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.24-93-g21e79af


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  21e79af4cf72429f98480fa34912a4ce236b09a0 (commit)
      from  5a7ac040efe94f8c49c5ec95c90ad6baf3b37744 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21e79af4cf72429f98480fa34912a4ce236b09a0

commit 21e79af4cf72429f98480fa34912a4ce236b09a0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Aug 26 17:33:47 2016 -0300

    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.

diff --git a/ChangeLog b/ChangeLog
index be65e09..995b440 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-26  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* test-skeleton.c (delayed_exit_thread): Add initializer on struct
+	timespec C99 designated initialization.
+
 2016-08-26  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #19946]
diff --git a/test-skeleton.c b/test-skeleton.c
index b24ce1d..913a335 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -684,7 +684,7 @@ delayed_exit_thread (void *seconds_as_ptr)
 {
   int seconds = (uintptr_t) seconds_as_ptr;
   struct timespec delay = { seconds, 0 };
-  struct timespec remaining = {};
+  struct timespec remaining = { 0 };
   if (nanosleep (&delay, &remaining) != 0)
     {
       printf ("error: nanosleep: %m\n");

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    5 +++++
 test-skeleton.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]