summary refs log tree commit diff
path: root/bin/aes.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-08-27 23:10:09 -0400
committerJune McEnroe <june@causal.agency>2019-08-27 23:10:09 -0400
commitb7e363d56ec656930c3732794ca6127ed3aae8e8 (patch)
tree5bb905d9e47c395c12f1d8e7f63dd7b997a8664e /bin/aes.c
parentRemove host thursday (diff)
downloadsrc-b7e363d56ec656930c3732794ca6127ed3aae8e8.tar.gz
src-b7e363d56ec656930c3732794ca6127ed3aae8e8.zip
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.
Diffstat (limited to 'bin/aes.c')
-rw-r--r--bin/aes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/aes.c b/bin/aes.c
index 640e9b9b..8ccc7899 100644
--- a/bin/aes.c
+++ b/bin/aes.c
@@ -36,7 +36,7 @@ static const wchar_t Table[128] = {
 
 static void enwiden(const char *ch) {
 	for (; *ch; ++ch) {
-		if ((byte)*ch < 128) printf("%lc", Table[(byte)*ch]);
+		if ((byte)*ch < 128) printf("%lc", (wint_t)Table[(byte)*ch]);
 		else printf("%c", *ch);
 	}
 }
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
 	setlocale(LC_CTYPE, "");
 	for (int i = 1; i < argc; ++i) {
 		enwiden(argv[i]);
-		if (i < argc - 1) printf("%lc", Table[' ']);
+		if (i < argc - 1) printf("%lc", (wint_t)Table[' ']);
 		else printf("\n");
 	}
 	if (argc > 1) return EXIT_SUCCESS;