preparatory patch for -Wwrite-strings #1

This commit is contained in:
Denis Vlasenko
2007-01-29 22:51:00 +00:00
parent e935602ff5
commit a41fdf331a
17 changed files with 59 additions and 52 deletions

View File

@ -41,7 +41,7 @@ static void xputenv(char *s)
static void maybe_set_utc(int opt)
{
if (opt & DATE_OPT_UTC)
xputenv("TZ=UTC0");
xputenv((char*)"TZ=UTC0");
}
int date_main(int argc, char **argv)
@ -218,7 +218,7 @@ format_utc:
i = 22;
goto format_utc;
} else /* default case */
date_fmt = "%a %b %e %H:%M:%S %Z %Y";
date_fmt = (char*)"%a %b %e %H:%M:%S %Z %Y";
}
if (*date_fmt == '\0') {
@ -228,7 +228,7 @@ format_utc:
/* Handle special conversions */
if (strncmp(date_fmt, "%f", 2) == 0) {
date_fmt = "%Y.%m.%d-%H:%M:%S";
date_fmt = (char*)"%Y.%m.%d-%H:%M:%S";
}
/* Generate output string */