From 7b5aef74456b00238076b71bba330d5d4fcb9c26 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Tue, 17 Mar 2020 14:18:23 +0530 Subject: [PATCH] HAL_ChibiOS: deprecate realloc for ChibiOS build, so as to return error when used --- libraries/AP_HAL_ChibiOS/hwdef/common/stdio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.h b/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.h index 03168770d49cb..d0e0db6285972 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.h @@ -44,9 +44,10 @@ int printf(const char *fmt, ...); void *malloc(size_t size); void *calloc(size_t nmemb, size_t size); void free(void *ptr); - +void *realloc(void* ptr, size_t size) __attribute__((deprecated)); extern int (*vprintf_console_hook)(const char *fmt, va_list arg); + #define L_tmpnam 32 #ifdef __cplusplus