From: Jim Meyering Date: Tue, 25 Sep 2007 12:25:41 +0000 (+0200) Subject: cal: avoid -Wformat warnings X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c6c72bfe3c09250b4f5f4e044755b000c2c55de;p=util-linux cal: avoid -Wformat warnings Avoid this warning from gcc -Wformat: "format not a string literal and no format arguments". Signed-off-by: Jim Meyering --- diff --git a/misc-utils/cal.c b/misc-utils/cal.c index 77333d81..10bb8b5c 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -702,7 +702,7 @@ ascii_day(char *p, int day) { } if (day & TODAY_FLAG) { day &= ~TODAY_FLAG; - p += sprintf(p, Senter); + p += sprintf(p, "%s", Senter); highlight = 1; } if (julian) { @@ -725,7 +725,7 @@ ascii_day(char *p, int day) { *p++ = aday[day][1]; } if (highlight) - p += sprintf(p, Sexit); + p += sprintf(p, "%s", Sexit); *p++ = ' '; return p; }