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/pr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pr.c') diff --git a/src/pr.c b/src/pr.c index 0d8845fe6..044bb5609 100644 --- a/src/pr.c +++ b/src/pr.c @@ -691,10 +691,10 @@ static bool use_col_separator = false; /* String used to separate columns if the -S option has been specified. Default without -S but together with one of the column options -a|COLUMN|-m is a `space' and with the -J option a `tab'. */ -static char *col_sep_string = ""; +static char *col_sep_string = (char *) ""; static int col_sep_length = 0; -static char *column_separator = " "; -static char *line_separator = "\t"; +static char *column_separator = (char *) " "; +static char *line_separator = (char *) "\t"; /* Number of separator characters waiting to be printed as soon as we know that we have any input remaining to be printed. */ @@ -1030,7 +1030,7 @@ main (int argc, char **argv) case 'S': old_s = false; /* Reset an additional input of -s, -S dominates -s */ - col_sep_string = ""; + col_sep_string = bad_cast (""); col_sep_length = 0; use_col_separator = true; if (optarg) -- cgit v1.2.3-54-g00ecf