bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] pthread tests: fix missing-declarations warning.


From: Bernhard Voelker
Subject: [PATCH] pthread tests: fix missing-declarations warning.
Date: Mon, 22 Jul 2019 08:55:44 +0200

Running tests on GCC-9.1.1 with -Werror stops at:
  test-pthread-cond.c:87:1: error: no previous declaration for \
    'test_pthread_cond_wait' [-Werror=missing-declarations]
     87 | test_pthread_cond_wait ()
        | ^~~~~~~~~~~~~~~~~~~~~~

* tests/test-pthread-cond.c (test_pthread_cond_wait): Declare static.
---
 ChangeLog                 | 10 ++++++++++
 tests/test-pthread-cond.c |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 40d3e6741..14640d475 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-07-22  Bernhard Voelker  <address@hidden>
+
+       pthread tests: fix missing-declarations warning.
+       Running tests on GCC-9.1.1 with -Werror stops at:
+         test-pthread-cond.c:87:1: error: no previous declaration for \
+           'test_pthread_cond_wait' [-Werror=missing-declarations]
+            87 | test_pthread_cond_wait ()
+               | ^~~~~~~~~~~~~~~~~~~~~~
+       * tests/test-pthread-cond.c (test_pthread_cond_wait): Declare static.
+
 2019-07-19  Bruno Haible  <address@hidden>
 
        parse-datetime: Avoid warnings from bison versions >= 3.3.
diff --git a/tests/test-pthread-cond.c b/tests/test-pthread-cond.c
index d229c7dcc..201b1e15b 100644
--- a/tests/test-pthread-cond.c
+++ b/tests/test-pthread-cond.c
@@ -83,7 +83,7 @@ pthread_cond_wait_routine (void *arg)
   return NULL;
 }
 
-void
+static void
 test_pthread_cond_wait ()
 {
   struct timespec remain;
-- 
2.22.0




reply via email to

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