]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
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 9ba33c35703a2f457265e83b089f4adbe8f1cf37..2bf1630cb8be3ec0cf66e7ef73a2a881256ce658 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 d808908b4e761333e1e9aa6ae55e1675f6b8baed..8095f2ec19e6d82129374e018b9c7c2b233e0082 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 c991181d5a660b3c50bb17a21810c38fd448f431..9253d9b16711f75fe59b792c851dc9714f4349cb 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 5300d3b4a899c905a86f2b444649d6d9218aa633..6ab7c3d437945ffcde367175496c21af87f7865e 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 9eee8221bed9c1ba7c8aef9998003963c142d9c6..347623dbc5439a7ab8248d924134e692caf321a1 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 658ceea209798d075d8d34e79d4208a925bdfe22..bd79cc96cf77b06a80dbc1c95caaee0b6e365c5c 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 8b75621625e5994c5918eacd0b8d366720b66c87..f75fb8ed91c7d025773fcdd23052e9fed09cc0a9 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 03be106090c9a0d55e90e6d8bf9237098c463215..f1058269285b353aa7733a5550dbb24294494771 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 1f89fda708f66c5683bb5be7ae5dc3b89d3c485c..1f10480a3c2cefe78d98143dde30b3abf00b26e7 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 5aedf29e7be22d7f2321a35e373f17e7ee55c742..52c1892f44be5ee913bf5b5fb6a87cab63b46b6f 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 d0ae1ed4d9c280ab0922db85e8e52f6e990e7528..41d4a71225c89170416a368f184e483d2395ed10 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 a10de9f7a43d462ad457d2f2a39dbcf6ca4e68fc..455cea63a888e170e5ae860bcdbd82fe5620c9fd 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 003fa1f8eb74efec81cfee998922c5313563268f..6d25959982b5d20ecb05e6feefa36f8db91c0e00 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 a8772f84d9a4d9d08ac684ccf3627192f4294de3..6d006f216e128973c3b290a84748254e84111bc2 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 17638de66cca11fa7e4b87d1537535a5d1dcb83a..40178cc4c4c722f3410bb444ceca324ab31ce96b 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 033e98e1dcace813ec5c3bdb61b5d2cce80efa81..a956d250dc36a06b97d9bf321e90d264db388710 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 b5d1cb511b3bf346be4791b14e8a746f1ec919f7..f3ad462842a8437e0a9a78da3c6cf78fb9700fa2 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 17a80a69e6a8f259785524c74bcf12c6a0486d63..59647344938ec7b74b00c39a2e6a51b01ede5023 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 e19acf3cf25e333fffdaf24fd837c4e02659fdae..79e743829a63709c374ecacdfb360e07637995b1 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 9e986930cfe4ff0417840419f1e165912a7919cf..9c96ab38de67d0c6b3ec48bdc297b721e5fc200a 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 d47ab2f27884dc1a240f82e1380e8d76dd58a489..ec7b5278eba86f5ad29317ce107f87cc61a606c2 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 13e53f670ef18eba7bfbc7e96041c08bc013ab70..6d98b5d4fad193490edea507053a88c3753a4022 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 24d347e641c8a982603220578f40ed16e7625960..9cd691acf5d05e9aef8de160dd1d42ef3423d6d2 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 3cae86d2065c6c785bf64d58c1d26a7424c815fe..bf680c5775c05669e0eedeac6cec267806bb10f8 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 6d3257e366425bcad8bf43868cd0d4a828c116bd..f283b17cf9f68753025a4ccd79f58e7acfcb45ff 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 371e60b47de5ccbf926258214c191d0476858344..b039f01e5096eb15c1ea08e91c03c4f5858ccc06 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 d53d3370870f5d441f5a2b86312a66e7c5b2e46d..7fbc8c6047a33d0a22c6f809514db00ecf5d0ad0 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 c113ba35dda69d1432c5f7f14757bb1494e39529..8b4318d4e2ff7410c15d61a7f12acac2ad0de669 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 65e5342e02bccd78132c4c5200f10758e39a214d..e58d63fbaf2bedf569d360aa2f548378ca2bd569 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)
     {