aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Gladkov <gladkov.alexey@gmail.com>2020-04-15 18:18:13 +0200
committerAlexey Gladkov <gladkov.alexey@gmail.com>2020-04-15 18:18:13 +0200
commit0a22c05f4f4003cc057b6b809e0ea311487a8745 (patch)
treeebcf9a45544245d90be052002b681020a6c12a5c
parent18c147f29c985944b94d163e7b6772b933d71a2a (diff)
downloadkbd-0a22c05f4f4003cc057b6b809e0ea311487a8745.tar.gz
showconsolefont: Fix -Wsign-conversion warnings
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
-rw-r--r--src/showconsolefont.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/showconsolefont.c b/src/showconsolefont.c
index f5d4210e..5f42d64f 100644
--- a/src/showconsolefont.c
+++ b/src/showconsolefont.c
@@ -72,7 +72,7 @@ getoldunicodemap(struct kfont_context *ctx)
#define BASE 041 /* ' '+1 */
static void
-setnewunicodemap(struct kfont_context *ctx, int *list, int cnt)
+setnewunicodemap(struct kfont_context *ctx, unsigned int *list, int cnt)
{
unsigned short i;
@@ -119,7 +119,8 @@ int main(int argc, char **argv)
int mode;
const char *space, *sep;
char *console = NULL;
- int list[64], lth, info = 0;
+ unsigned int list[64];
+ int lth, info = 0;
set_progname(argv[0]);
setuplocale();
@@ -201,7 +202,7 @@ int main(int argc, char **argv)
}
printf("%1$s%1$s%1$s%1$s", space);
for (j = 0; j < cols && i + j * rows < n; j++) {
- putchar(BASE + (i % nr) * cols + j);
+ printf("%c", BASE + (i % nr) * cols + j);
printf(sep, space);
if (j % 8 == 7)
printf(sep, space);