coreutils
[Top][All Lists]
Advanced

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

[coreutils] [PATCH] tests: silence 'make syntax-check'


From: Eric Blake
Subject: [coreutils] [PATCH] tests: silence 'make syntax-check'
Date: Mon, 9 Aug 2010 14:59:33 -0600

* gl/tests/test-rand-isaac.c (main): Avoid warnings from
syntax-check.
---

Committing as obvious.  The set_program_name hack is borrowed
liberally from test-ino-map.c.

 gl/tests/test-rand-isaac.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gl/tests/test-rand-isaac.c b/gl/tests/test-rand-isaac.c
index 330b18f..c1ad01a 100644
--- a/gl/tests/test-rand-isaac.c
+++ b/gl/tests/test-rand-isaac.c
@@ -576,6 +576,7 @@ static isaac_word const expected[2][ISAAC_WORDS] =
 int
 main (int argc, char **argv)
 {
+  /* set_program_name (argv[0]); placate overzealous "syntax-check" test.  */
   unsigned int i;
   isaac_word r[ISAAC_WORDS];
   int iterations;
@@ -594,7 +595,7 @@ main (int argc, char **argv)

   /* If invoked with a positive argument, run a benchmark;
      if with a negative, run a do-nothing benchmark.  */
-  for (iterations = argc <= 1 ? 0 : atoi (argv[1]);
+  for (iterations = argc <= 1 ? 0 : strtol (argv[1], 10, NULL);
        iterations != 0;
        iterations += (iterations < 0 ? 1 : -1))
     if (0 <= iterations)
-- 
1.7.2.1




reply via email to

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