From 854284f7887677395239c1085b27a09e834291b7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 28 Oct 2008 22:06:44 +0100 Subject: 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): --- src/ls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ls.c') diff --git a/src/ls.c b/src/ls.c index d5bd8d1e0..460e161d1 100644 --- a/src/ls.c +++ b/src/ls.c @@ -1769,7 +1769,7 @@ decode_switches (int argc, char **argv) case FULL_TIME_OPTION: format = long_format; - time_style_option = "full-iso"; + time_style_option = bad_cast ("full-iso"); break; case COLOR_OPTION: @@ -1887,7 +1887,7 @@ decode_switches (int argc, char **argv) if (! style) if (! (style = getenv ("TIME_STYLE"))) - style = "locale"; + style = bad_cast ("locale"); while (strncmp (style, posix_prefix, sizeof posix_prefix - 1) == 0) { -- cgit v1.2.3-54-g00ecf