summaryrefslogtreecommitdiff
path: root/src/chroot.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-10-28 22:06:44 +0100
committerJim Meyering <meyering@redhat.com>2008-11-10 08:11:59 +0100
commit854284f7887677395239c1085b27a09e834291b7 (patch)
treec719e6ee13b41342e70faa7bf6f8e3bc0acdbfd1 /src/chroot.c
parent0e2ac2de24b2d64924826a693630d8d555beae3a (diff)
downloadcoreutils-854284f7887677395239c1085b27a09e834291b7.tar.xz
avoid warnings about discarding "qualifiers from pointer target type"
Use the new "bad_cast" function or an actual cast-to-"(char *)" to avoid warnings. * src/system.h (bad_cast): Define. * src/chown.c (main): * src/chroot.c (main): * src/date.c (main): * src/du.c (main): * src/expand.c (stdin_argv): * src/ls.c (decode_switches): * src/md5sum.c (main): * src/paste.c (main): * src/pr.c (col_sep_string, column_separator, line_separator, main): * src/sort.c (main): * src/split.c (main): * src/tail.c (main): * src/unexpand.c (stdin_argv): * src/yes.c (main):
Diffstat (limited to 'src/chroot.c')
-rw-r--r--src/chroot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chroot.c b/src/chroot.c
index 299acbcbf..1eb443c24 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -93,9 +93,9 @@ main (int argc, char **argv)
/* No command. Run an interactive shell. */
char *shell = getenv ("SHELL");
if (shell == NULL)
- shell = "/bin/sh";
+ shell = bad_cast ("/bin/sh");
argv[0] = shell;
- argv[1] = "-i";
+ argv[1] = bad_cast ("-i");
argv[2] = NULL;
}
else