diff --git a/hardware/tools/esp8266/sdk/include/ets_sys.h b/hardware/tools/esp8266/sdk/include/ets_sys.h index b7b79c341..7908699bb 100644 --- a/hardware/tools/esp8266/sdk/include/ets_sys.h +++ b/hardware/tools/esp8266/sdk/include/ets_sys.h @@ -91,10 +91,10 @@ typedef void (*int_handler_t)(void*); ETS_INTR_DISABLE(ETS_GPIO_INUM) -void *pvPortMalloc(size_t xWantedSize); -void *pvPortRealloc(void* ptr, size_t xWantedSize); +void *pvPortMalloc(size_t xWantedSize) __attribute__((malloc, alloc_size(1))); +void *pvPortRealloc(void* ptr, size_t xWantedSize) __attribute__((alloc_size(2))); void pvPortFree(void *ptr); -void *vPortMalloc(size_t xWantedSize); +void *vPortMalloc(size_t xWantedSize) __attribute__((malloc, alloc_size(1))); void vPortFree(void *ptr); void *ets_memcpy(void *dest, const void *src, size_t n); void *ets_memset(void *s, int c, size_t n); diff --git a/hardware/tools/esp8266/sdk/include/osapi.h b/hardware/tools/esp8266/sdk/include/osapi.h index 6935388c5..11e03803f 100644 --- a/hardware/tools/esp8266/sdk/include/osapi.h +++ b/hardware/tools/esp8266/sdk/include/osapi.h @@ -50,7 +50,7 @@ os_printf_plus(flash_str, ##__VA_ARGS__); \ } while(0) #else -extern int os_printf_plus(const char * format, ...); +extern int os_printf_plus(const char * format, ...) __attribute__ ((format (printf, 1, 2))); #define os_printf os_printf_plus #endif