1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2025-04-07 17:32:45 -04:00

Fix API usage

This commit is contained in:
Alex Kotov 2022-01-19 17:04:46 +05:00
parent a4fc6661e3
commit bd3d2ea030
2 changed files with 12 additions and 3 deletions

View file

@ -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

View file

@ -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();