Skip to content

Commit

Permalink
Update test/test_buffer.h (#314)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maflcko authored May 4, 2024
1 parent 887d3a1 commit 024bb37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/test_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 024bb37

Please sign in to comment.