1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

add some __attribute__ for compiler to get better optimizations and warning handle

This commit is contained in:
Markus Sattler
2015-05-17 00:11:41 +02:00
parent cdf4aa0536
commit 730025cefc
2 changed files with 4 additions and 4 deletions

View File

@ -91,10 +91,10 @@ typedef void (*int_handler_t)(void*);
ETS_INTR_DISABLE(ETS_GPIO_INUM) ETS_INTR_DISABLE(ETS_GPIO_INUM)
void *pvPortMalloc(size_t xWantedSize); void *pvPortMalloc(size_t xWantedSize) __attribute__((malloc, alloc_size(1)));
void *pvPortRealloc(void* ptr, size_t xWantedSize); void *pvPortRealloc(void* ptr, size_t xWantedSize) __attribute__((alloc_size(2)));
void pvPortFree(void *ptr); void pvPortFree(void *ptr);
void *vPortMalloc(size_t xWantedSize); void *vPortMalloc(size_t xWantedSize) __attribute__((malloc, alloc_size(1)));
void vPortFree(void *ptr); void vPortFree(void *ptr);
void *ets_memcpy(void *dest, const void *src, size_t n); void *ets_memcpy(void *dest, const void *src, size_t n);
void *ets_memset(void *s, int c, size_t n); void *ets_memset(void *s, int c, size_t n);

View File

@ -50,7 +50,7 @@
os_printf_plus(flash_str, ##__VA_ARGS__); \ os_printf_plus(flash_str, ##__VA_ARGS__); \
} while(0) } while(0)
#else #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 #define os_printf os_printf_plus
#endif #endif