From 657763adc3e412ab694f78d20680793fb025b4a0 Mon Sep 17 00:00:00 2001 From: maflcko <6399679+maflcko@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:58:46 +0200 Subject: [PATCH] Update test/test_buffer.h This fixes a compile error on clang-18: In file included from src/fuzz/generate_corpus.c:13: src/fuzz/../test/test_buffer.h:13:25: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 13 | rt_buffer_t *buffer_init(); | ^ | void 1 error generated. --- src/test/test_buffer.c | 2 +- src/test/test_buffer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_buffer.c b/src/test/test_buffer.c index 05e53069..11c90413 100644 --- a/src/test/test_buffer.c +++ b/src/test/test_buffer.c @@ -2,7 +2,7 @@ #include "test_buffer.h" -rt_buffer_t *buffer_init() { +rt_buffer_t *buffer_init(void) { rt_buffer_t *buffer = calloc(1, sizeof(rt_buffer_t)); buffer->size = 1024; buffer->bytes = malloc(buffer->size); diff --git a/src/test/test_buffer.h b/src/test/test_buffer.h index 9ff5a5b4..cdceac05 100644 --- a/src/test/test_buffer.h +++ b/src/test/test_buffer.h @@ -10,7 +10,7 @@ typedef struct rt_buffer_ctx_s { size_t pos; } rt_buffer_ctx_t; -rt_buffer_t *buffer_init(); +rt_buffer_t *buffer_init(void); void buffer_reset(rt_buffer_t *buffer); void buffer_grow(rt_buffer_t *buffer, size_t len); void buffer_free(rt_buffer_t *buffer);