]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid missing-declarations warning in various tests.
authorBruno Haible <bruno@clisp.org>
Mon, 22 Jul 2019 10:32:39 +0000 (12:32 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 22 Jul 2019 10:32:39 +0000 (12:32 +0200)
* tests/test-argp.c (fail, test1, test2, test_file, test3, test4, test5,
test6, test_optional, test7, test8, test9, test10, test11, test12,
test13, test14, test15, test_fun): Declare static.
* tests/test-cnd.c (test_cnd_wait): Likewise.
* tests/test-cond.c (test_cond): Likewise.

ChangeLog
tests/test-argp.c
tests/test-cnd.c
tests/test-cond.c

index 527869d074974fb9766086ff448345aba6511552..4b7bb205440dd9e7837ad727d6fdc90326798e8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-07-22  Bruno Haible  <bruno@clisp.org>
+
+       Avoid missing-declarations warning in various tests.
+       * tests/test-argp.c (fail, test1, test2, test_file, test3, test4, test5,
+       test6, test_optional, test7, test8, test9, test10, test11, test12,
+       test13, test14, test15, test_fun): Declare static.
+       * tests/test-cnd.c (test_cnd_wait): Likewise.
+       * tests/test-cond.c (test_cond): Likewise.
+
 2019-07-22  Bernhard Voelker  <mail@bernhard-voelker.de>
 
        pthread tests: Avoid missing-declarations warning.
index 0713d7fce5dfbcc212c5ea9e2a8a969aff166add..86ddbf3e25c48c69d0354ce58c94ab889a1ac8f7 100644 (file)
@@ -279,14 +279,14 @@ struct argp test_argp = {
 int test_number;
 unsigned failure_count = 0;
 
-void
+static void
 fail (const char *msg)
 {
   fprintf (stderr, "Test %d: %s\n", test_number, msg);
   failure_count++;
 }
 
-void
+static void
 test1 (struct argp *argp)
 {
   INIT_TEST1 (1, "--test");
@@ -296,7 +296,7 @@ test1 (struct argp *argp)
     fail ("option not processed");
 }
 
-void
+static void
 test2 (struct argp *argp)
 {
   INIT_TEST1 (2, "-t");
@@ -306,7 +306,7 @@ test2 (struct argp *argp)
     fail ("option not processed");
 }
 
-void
+static void
 test_file (struct argp *argp, int argc, char **argv, struct test_args *args)
 {
   if (argp_parse (argp, argc, argv, 0, NULL, args))
@@ -317,35 +317,35 @@ test_file (struct argp *argp, int argc, char **argv, struct test_args *args)
     fail ("option processed incorrectly");
 }
 
-void
+static void
 test3 (struct argp *argp)
 {
   INIT_TEST1 (3, "--file=FILE");
   test_file (argp, argc, argv, &test_args);
 }
 
-void
+static void
 test4 (struct argp *argp)
 {
   INIT_TEST2 (4, "--file", "FILE");
   test_file (argp, argc, argv, &test_args);
 }
 
-void
+static void
 test5 (struct argp *argp)
 {
   INIT_TEST1 (5, "--input=FILE");
   test_file (argp, argc, argv, &test_args);
 }
 
-void
+static void
 test6 (struct argp *argp)
 {
   INIT_TEST2 (6, "--input", "FILE");
   test_file (argp, argc, argv, &test_args);
 }
 
-void
+static void
 test_optional (struct argp *argp, int argc, char **argv,
                struct test_args *args, const char *val, const char *a)
 {
@@ -372,49 +372,49 @@ test_optional (struct argp *argp, int argc, char **argv,
     }
 }
 
-void
+static void
 test7 (struct argp *argp)
 {
   INIT_TEST1 (7, "-oARG");
   test_optional (argp, argc, argv, &test_args, "ARG", NULL);
 }
 
-void
+static void
 test8 (struct argp *argp)
 {
   INIT_TEST2 (8, "-o", "ARG");
   test_optional (argp, argc, argv, &test_args, NULL, "ARG");
 }
 
-void
+static void
 test9 (struct argp *argp)
 {
   INIT_TEST1 (9, "--optional=ARG");
   test_optional (argp, argc, argv, &test_args, "ARG", NULL);
 }
 
-void
+static void
 test10 (struct argp *argp)
 {
   INIT_TEST2 (10, "--optional", "ARG");
   test_optional (argp, argc, argv, &test_args, NULL, "ARG");
 }
 
-void
+static void
 test11 (struct argp *argp)
 {
   INIT_TEST1 (11, "--optiona=ARG");
   test_optional (argp, argc, argv, &test_args, "ARG", NULL);
 }
 
-void
+static void
 test12 (struct argp *argp)
 {
   INIT_TEST3 (12, "--option", "--optional=OPT", "FILE");
   test_optional (argp, argc, argv, &test_args, "OPT", "FILE");
 }
 
-void
+static void
 test13 (struct argp *argp)
 {
   INIT_TEST1 (1, "--cantiga");
@@ -424,7 +424,7 @@ test13 (struct argp *argp)
     fail ("option not processed");
 }
 
-void
+static void
 test14 (struct argp *argp)
 {
   INIT_TEST1 (1, "--limerick");
@@ -434,7 +434,7 @@ test14 (struct argp *argp)
     fail ("option not processed");
 }
 
-void
+static void
 test15 (struct argp *argp)
 {
   INIT_TEST2 (1, "-r", "FILE");
@@ -446,7 +446,7 @@ test15 (struct argp *argp)
 
 typedef void (*test_fp) (struct argp *argp);
 
-test_fp test_fun[] = {
+static test_fp test_fun[] = {
   test1,  test2,  test3,  test4,
   test5,  test6,  test7,  test8,
   test9,  test10, test11, test12,
index bd8d4f255e99d1c836f1de87c524f37da60a32c7..074c2c72bd5a1bbdf0481b4d7eb4745f6ee7a41f 100644 (file)
@@ -78,7 +78,7 @@ cnd_wait_routine (void *arg)
   return 0;
 }
 
-void
+static void
 test_cnd_wait ()
 {
   struct timespec remain;
index e8bd472e3a0bebf7bd6be371505cb2de600a30b8..794fb2d314abed24d19b819b7f76f4e7b3dd289f 100644 (file)
@@ -78,7 +78,7 @@ cond_routine (void *arg)
   return NULL;
 }
 
-void
+static void
 test_cond ()
 {
   int remain = 2;