mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
add some __attribute__ for compiler to get better optimizations and warning handle
This commit is contained in:
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user