From b7e363d56ec656930c3732794ca6127ed3aae8e8 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Tue, 27 Aug 2019 23:10:09 -0400 Subject: Cast %lc parameter to wint_t I hadn't realized that's what type %lc takes and suddenly started seeing warnings about it for some reason. --- bin/shotty.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/shotty.c') diff --git a/bin/shotty.c b/bin/shotty.c index 7cdf2d4a..1fde095f 100644 --- a/bin/shotty.c +++ b/bin/shotty.c @@ -98,7 +98,7 @@ static void span(const struct Style *prev, const struct Cell *cell) { break; case '&': printf("&"); break; case '<': printf("<"); break; case '>': printf(">"); - break; default: printf("%lc", cell->ch); + break; default: printf("%lc", (wint_t)cell->ch); } } @@ -150,7 +150,7 @@ static char updateNUL(wchar_t ch) { return NUL; } if (x + width > cols) { - warnx("cannot fit '%lc'", ch); + warnx("cannot fit '%lc'", (wint_t)ch); return NUL; } @@ -218,7 +218,7 @@ static char updateESC(wchar_t ch) { case '>': return NUL; case CSI: return CSI; case OSC: return OSC; - default: warnx("unhandled ESC %lc", ch); return NUL; + default: warnx("unhandled ESC %lc", (wint_t)ch); return NUL; } } @@ -350,7 +350,7 @@ static char updateCSI(wchar_t ch) { } break; case 't': // ignore - break; default: warnx("unhandled CSI %lc", ch); + break; default: warnx("unhandled CSI %lc", (wint_t)ch); } if (opts.debug) { @@ -361,7 +361,7 @@ static char updateCSI(wchar_t ch) { if (ch < 128 && Name[ch]) { printf("%s\n", Name[ch]); } else { - printf("%lc\n", ch); + printf("%lc\n", (wint_t)ch); } html(); } -- cgit 1.4.1