Cast NULL to `(char *)' in call to variadic function,
authorJim Meyering <jim@meyering.net>
Wed, 5 Nov 2003 03:53:19 +0000 (03:53 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 5 Nov 2003 03:53:19 +0000 (03:53 +0000)
parse_long_options, so that it works even on systems for which
sizeof char* != sizeof int.

29 files changed:
src/basename.c
src/chroot.c
src/cksum.c
src/dd.c
src/dirname.c
src/echo.c
src/expr.c
src/factor.c
src/hostid.c
src/hostname.c
src/link.c
src/logname.c
src/nice.c
src/nohup.c
src/pathchk.c
src/printenv.c
src/printf.c
src/pwd.c
src/setuidgid.c
src/sleep.c
src/stty.c
src/sync.c
src/test.c
src/tsort.c
src/unlink.c
src/uptime.c
src/users.c
src/whoami.c
src/yes.c

index 9ba33c3..2bf1630 100644 (file)
@@ -100,7 +100,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
   if (argc > 1 && STREQ (argv[1], "--"))
index d808908..8095f2e 100644 (file)
@@ -72,7 +72,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
   if (argc <= 1)
     {
       error (0, 0, _("too few arguments"));
index c991181..9253d9b 100644 (file)
@@ -309,7 +309,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   have_read_stdin = 0;
 
index 5300d3b..6ab7c3d 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -1161,7 +1161,7 @@ main (int argc, char **argv)
   atexit (close_stdout_wrapper);
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   /* Don't close stdout on exit from here on.  */
   closeout_func = NULL;
index 9eee822..347623d 100644 (file)
@@ -75,7 +75,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
   if (argc > 1 && STREQ (argv[1], "--"))
index 658ceea..bd79cc9 100644 (file)
@@ -127,7 +127,7 @@ main (int argc, char **argv)
   /* Don't recognize --help or --version if POSIXLY_CORRECT is set.  */
   if (getenv ("POSIXLY_CORRECT") == NULL)
     parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL, NULL);
+                     usage, AUTHORS, (char const *) NULL, NULL);
   else
     allow_options = 0;
 
index 8b75621..f75fb8e 100644 (file)
@@ -188,7 +188,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
   if (argc > 1 && STREQ (argv[1], "--"))
index 03be106..f105826 100644 (file)
@@ -202,7 +202,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
   if (argc > 1 && STREQ (argv[1], "--"))
index 1f89fda..1f10480 100644 (file)
@@ -69,7 +69,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   if (argc > 1)
     {
index 5aedf29..52c1892 100644 (file)
@@ -91,7 +91,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
 #ifdef HAVE_SETHOSTNAME
   if (argc == 2)
index d0ae1ed..41d4a71 100644 (file)
@@ -73,7 +73,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
index a10de9f..455cea6 100644 (file)
@@ -72,7 +72,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index 003fa1f..6d25959 100644 (file)
@@ -99,7 +99,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   for (i = 1; i < argc; /* empty */)
     {
index a8772f8..6d006f2 100644 (file)
@@ -86,7 +86,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   /* The above handles --help and --version.
      Now, handle `--'.  */
index 17638de..40178cc 100644 (file)
@@ -166,7 +166,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((optc = getopt_long (argc, argv, "p", longopts, NULL)) != -1)
     {
index 033e98e..a956d25 100644 (file)
@@ -94,7 +94,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index b5d1cb5..f3ad462 100644 (file)
@@ -566,7 +566,7 @@ main (int argc, char **argv)
   posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
   if (!posixly_correct)
     parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                       usage, AUTHORS, NULL);
+                       usage, AUTHORS, (char const *) NULL);
 
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
index 17a80a6..5964734 100644 (file)
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -68,7 +68,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   if (1 < argc)
     error (0, 0, _("ignoring non-option arguments"));
index e19acf3..79e7438 100644 (file)
@@ -83,7 +83,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
index 9e98693..9c96ab3 100644 (file)
@@ -120,7 +120,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index d47ab2f..ec7b527 100644 (file)
@@ -750,7 +750,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   output_type = changed;
   verbose_output = 0;
index 13e53f6..6d98b5d 100644 (file)
@@ -65,7 +65,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   if (1 < argc)
     error (0, 0, _("ignoring all arguments"));
index 24d347e..9cd691a 100644 (file)
@@ -1101,7 +1101,7 @@ main (int margc, char **margv)
       if (margc < 2 || strcmp (margv[margc - 1], "]") != 0)
        {
          parse_long_options (margc, margv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                             usage, AUTHORS, NULL);
+                             usage, AUTHORS, (char const *) NULL);
          test_syntax_error (_("missing `]'\n"), NULL);
        }
 
index 3cae86d..bf680c5 100644 (file)
@@ -560,7 +560,7 @@ main (int argc, char **argv)
   exit_status = 0;
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((opt = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     switch (opt)
index 6d3257e..f283b17 100644 (file)
@@ -74,7 +74,7 @@ main (int argc, char **argv)
   /* Don't recognize --help or --version if POSIXLY_CORRECT is set.  */
   if (getenv ("POSIXLY_CORRECT") == NULL)
     parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                       usage, AUTHORS, NULL);
+                       usage, AUTHORS, (char const *) NULL);
 
   /* The above handles --help and --version.
      Since there is no other invocation of getopt, handle `--' here.  */
index 371e60b..b039f01 100644 (file)
@@ -216,7 +216,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((optc = getopt_long (argc, argv, "", longopts, &longind)) != -1)
     {
index d53d337..7fbc8c6 100644 (file)
@@ -143,7 +143,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((optc = getopt_long (argc, argv, "", longopts, &longind)) != -1)
     {
index c113ba3..8b4318d 100644 (file)
@@ -77,7 +77,7 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     usage, AUTHORS, NULL);
+                     usage, AUTHORS, (char const *) NULL);
 
   while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
     {
index 65e5342..e58d63f 100644 (file)
--- a/src/yes.c
+++ b/src/yes.c
@@ -74,7 +74,7 @@ main (int argc, char **argv)
   /* Don't recognize --help or --version if POSIXLY_CORRECT is set.  */
   if (getenv ("POSIXLY_CORRECT") == NULL)
     parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                       usage, AUTHORS, NULL);
+                       usage, AUTHORS, (char const *) NULL);
 
   if (argc == 1)
     {