Jim Meyering <[EMAIL PROTECTED]> writes:

> +#define TMP (char *) "/tmp"
> ...

How about the following change to mktemp.c instead?  It's simpler, and
avoids the need for the macro and the cast.

2008-10-16  Paul Eggert  <[EMAIL PROTECTED]>

        * src/mktemp.c (main): Add 'const' twice to avoid GCC warning.

diff --git a/src/mktemp.c b/src/mktemp.c
index 0555d41..ffb21d4 100644
--- a/src/mktemp.c
+++ b/src/mktemp.c
@@ -126,8 +126,8 @@ mkdtemp_len (char *tmpl, size_t suff_len, bool dry_run)
 int
 main (int argc, char **argv)
 {
-  char *dest_dir;
-  char *dest_dir_arg = NULL;
+  char const *dest_dir;
+  char const *dest_dir_arg = NULL;
   bool suppress_stderr = false;
   int c;
   unsigned int n_args;


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to