From bd3d2ea030f015098140087a0e236f733a0c0c2f Mon Sep 17 00:00:00 2001
From: Alex Kotov <kotovalexarian@gmail.com>
Date: Wed, 19 Jan 2022 17:04:46 +0500
Subject: [PATCH] Fix API usage

---
 src/console.c       | 9 ++++++++-
 tests/test_printf.c | 6 ++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/console.c b/src/console.c
index 432c1fc..d92a96e 100644
--- a/src/console.c
+++ b/src/console.c
@@ -17,6 +17,13 @@
 
 #include <stddef.h>
 
+static void kernaux_console_printf_putc(
+    const char c,
+    void *const arg __attribute__((unused))
+) {
+    kernaux_console_putc(c);
+}
+
 void kernaux_console_putc(const char c __attribute__((unused)))
 {
 #ifdef ASM_I386
@@ -39,7 +46,7 @@ void kernaux_console_printf(const char *format, ...)
 {
     va_list va;
     va_start(va, format);
-    kernaux_vprintf(kernaux_console_putc, NULL, format, va);
+    kernaux_vprintf(kernaux_console_printf_putc, NULL, format, va);
     va_end(va);
 }
 #endif
diff --git a/tests/test_printf.c b/tests/test_printf.c
index 3996ce8..2ccc622 100644
--- a/tests/test_printf.c
+++ b/tests/test_printf.c
@@ -14,8 +14,10 @@
 static char buffer[BUFFER_SIZE];
 static size_t buffer_index;
 
-static void test_putchar(const char chr)
-{
+static void test_putchar(
+    const char chr,
+    void *const arg __attribute__((unused))
+) {
     if (buffer_index >= BUFFER_SIZE) {
         printf("Buffer overflow!\n");
         abort();