From 39969f0e296ea7605b274bf16524b6ebaaf9bbe2 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 20 Mar 2025 09:31:17 +0100 Subject: [PATCH] fixes compiler warnings --- libwrap/stdlib/malloc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libwrap/stdlib/malloc.c b/libwrap/stdlib/malloc.c index 8f4f432..dba9c76 100644 --- a/libwrap/stdlib/malloc.c +++ b/libwrap/stdlib/malloc.c @@ -2,16 +2,15 @@ /* These functions are intended for embedded RV32 systems and are obviously incorrect in general. */ +void *__wrap_malloc(unsigned long sz); +void __wrap_free(void *ptr); -void* __wrap_malloc(unsigned long sz) -{ - extern void* sbrk(long); - void* res = sbrk(sz); +void *__wrap_malloc(unsigned long sz) { + extern void *sbrk(long); + void *res = sbrk(sz); if ((long)res == -1) return 0; return res; } -void __wrap_free(void* ptr) -{ -} +void __wrap_free(void *ptr) { (void)(ptr); }