diff options
author | June McEnroe <june@causal.agency> | 2019-08-27 23:10:09 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-08-27 23:10:09 -0400 |
commit | 85423674ad6fec0609726ab4d0e22674e9c1c6c1 (patch) | |
tree | 8343acbea9b735d7eacbe38b77fd0293b5dc9537 /bin/aes.c | |
parent | Remove host thursday (diff) | |
download | src-85423674ad6fec0609726ab4d0e22674e9c1c6c1.tar.gz src-85423674ad6fec0609726ab4d0e22674e9c1c6c1.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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/aes.c b/bin/aes.c index 1472338f..705970dc 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; |