compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
align with other macro naming style Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
bc9b476d55
commit
fd0d6a9bf5
@ -40,7 +40,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
#include "uart.h"
|
||||
void dbg_printf_(const char *format, ...) printflike(1, 2);
|
||||
void dbg_printf_(const char *format, ...) printf_like(1, 2);
|
||||
void dbg_printf_init(void);
|
||||
void my_dump_byte(uint8_t *pdata, int dlen);
|
||||
#ifndef DEBUG_INFO
|
||||
@ -126,8 +126,8 @@ extern volatile uint32_t s_rom_debug_level;
|
||||
typedef void(*std_putc)(char *data, int size);
|
||||
|
||||
void log_vsprintf(std_putc putc, const char *fmt, va_list args)
|
||||
printflike(2, 0);
|
||||
void log_printf(const char *format, ...) printflike(1, 2);
|
||||
printf_like(2, 0);
|
||||
void log_printf(const char *format, ...) printf_like(1, 2);
|
||||
void log_set_putc(std_putc putc);
|
||||
void log_clr_putc(std_putc putc);
|
||||
int log_debug_level(uint8_t level);
|
||||
|
@ -50,7 +50,7 @@ extern "C"
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
void bl_os_printf(const char *__fmt, ...) printflike(1, 2);
|
||||
void bl_os_printf(const char *__fmt, ...) printf_like(1, 2);
|
||||
|
||||
void bl_os_assert_func(const char *file,
|
||||
int line,
|
||||
@ -175,7 +175,7 @@ void bl_os_log_write(uint32_t level,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *format,
|
||||
...) printflike(5, 6);
|
||||
...) printf_like(5, 6);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
@ -95,7 +95,7 @@ extern uint8_t _image_drom_size[];
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32C3_APP_FORMAT_MCUBOOT
|
||||
extern int ets_printf(const char *fmt, ...) printflike(1, 2);
|
||||
extern int ets_printf(const char *fmt, ...) printf_like(1, 2);
|
||||
extern uint32_t cache_suspend_icache(void);
|
||||
extern void cache_resume_icache(uint32_t val);
|
||||
extern void cache_invalidate_icache_all(void);
|
||||
|
@ -345,7 +345,7 @@ static int esp_get_time(void *t);
|
||||
static uint32_t esp_clk_slowclk_cal_get_wrapper(void);
|
||||
static void esp_log_writev(uint32_t level, const char *tag,
|
||||
const char *format, va_list args)
|
||||
printflike(3, 0);
|
||||
printf_like(3, 0);
|
||||
static void *esp_malloc_internal(size_t size);
|
||||
static void *esp_realloc_internal(void *ptr, size_t size);
|
||||
static void *esp_calloc_internal(size_t n, size_t size);
|
||||
@ -400,7 +400,7 @@ void ets_timer_arm_us(void *timer, uint32_t us, bool repeat);
|
||||
int64_t esp_timer_get_time(void);
|
||||
void esp_fill_random(void *buf, size_t len);
|
||||
void esp_log_write(uint32_t level, const char *tag, const char *format, ...)
|
||||
printflike(3, 4);
|
||||
printf_like(3, 4);
|
||||
uint32_t esp_log_timestamp(void);
|
||||
uint8_t esp_crc8(const uint8_t *p, uint32_t len);
|
||||
|
||||
|
@ -91,7 +91,7 @@ extern uint8_t _image_drom_size[];
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_APP_FORMAT_MCUBOOT
|
||||
extern int ets_printf(const char *fmt, ...) printflike(1, 2);
|
||||
extern int ets_printf(const char *fmt, ...) printf_like(1, 2);
|
||||
extern void cache_read_enable(int cpu);
|
||||
extern void cache_read_disable(int cpu);
|
||||
extern void cache_flush(int cpu);
|
||||
|
@ -323,7 +323,7 @@ static int32_t esp_get_random(uint8_t *buf, size_t len);
|
||||
static int32_t esp_get_time(void *t);
|
||||
static void esp_log_writev(uint32_t level, const char *tag,
|
||||
const char *format, va_list args)
|
||||
printflike(3, 0);
|
||||
printf_like(3, 0);
|
||||
static void *esp_malloc_internal(size_t size);
|
||||
static void *esp_realloc_internal(void *ptr, size_t size);
|
||||
static void *esp_calloc_internal(size_t n, size_t size);
|
||||
@ -368,7 +368,7 @@ extern void coex_bt_high_prio(void);
|
||||
int64_t esp_timer_get_time(void);
|
||||
void esp_fill_random(void *buf, size_t len);
|
||||
void esp_log_write(uint32_t level, const char *tag, const char *format, ...)
|
||||
printflike(3, 4);
|
||||
printf_like(3, 4);
|
||||
uint32_t esp_log_timestamp(void);
|
||||
uint8_t esp_crc8(const uint8_t *p, uint32_t len);
|
||||
void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num);
|
||||
|
@ -196,6 +196,6 @@ void IRAM_ATTR phy_exit_critical(uint32_t level);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int phy_printf(const char *format, ...) printflike(1, 2);
|
||||
int phy_printf(const char *format, ...) printf_like(1, 2);
|
||||
|
||||
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_WIRELESS_H */
|
||||
|
@ -119,7 +119,7 @@ typedef enum
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32S2_APP_FORMAT_MCUBOOT
|
||||
extern int ets_printf(const char *fmt, ...) printflike(1, 2);
|
||||
extern int ets_printf(const char *fmt, ...) printf_like(1, 2);
|
||||
extern int cache_ibus_mmu_set(uint32_t ext_ram, uint32_t vaddr,
|
||||
uint32_t paddr, uint32_t psize, uint32_t num,
|
||||
uint32_t fixed);
|
||||
|
@ -101,7 +101,7 @@ struct mount_info_s
|
||||
/* Helpers */
|
||||
|
||||
static void mount_sprintf(FAR struct mount_info_s *info,
|
||||
FAR const char *fmt, ...) printflike(2, 3);
|
||||
FAR const char *fmt, ...) printf_like(2, 3);
|
||||
#ifndef CONFIG_FS_PROCFS_EXCLUDE_MOUNT
|
||||
static int mount_entry(FAR const char *mountpoint,
|
||||
FAR struct statfs *statbuf, FAR void *arg);
|
||||
|
@ -1095,7 +1095,7 @@ extern "C"
|
||||
|
||||
typedef CODE void (*lib_dump_handler_t)(FAR void *arg,
|
||||
FAR const char *fmt, ...)
|
||||
printflike(2, 3);
|
||||
printf_like(2, 3);
|
||||
|
||||
/* Dump a buffer of data with handler */
|
||||
|
||||
@ -1140,19 +1140,19 @@ void lib_dumpvfile(int fd, FAR const char *msg, FAR const struct iovec *iov,
|
||||
|
||||
#ifndef CONFIG_CPP_HAVE_VARARGS
|
||||
#ifdef CONFIG_DEBUG_ALERT
|
||||
void _alert(const char *format, ...) sysloglike(1, 2);
|
||||
void _alert(const char *format, ...) syslog_like(1, 2);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_ERROR
|
||||
void _err(const char *format, ...) sysloglike(1, 2);
|
||||
void _err(const char *format, ...) syslog_like(1, 2);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_WARN
|
||||
void _warn(const char *format, ...) sysloglike(1, 2);
|
||||
void _warn(const char *format, ...) syslog_like(1, 2);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
void _info(const char *format, ...) sysloglike(1, 2);
|
||||
void _info(const char *format, ...) syslog_like(1, 2);
|
||||
#endif
|
||||
#endif /* CONFIG_CPP_HAVE_VARARGS */
|
||||
|
||||
|
@ -52,19 +52,19 @@
|
||||
* and a newline, on stderr.
|
||||
*/
|
||||
|
||||
void warn(FAR const char *fmt, ...) printflike(1, 2);
|
||||
void vwarn(FAR const char *fmt, va_list ap) printflike(1, 0);
|
||||
void warn(FAR const char *fmt, ...) printf_like(1, 2);
|
||||
void vwarn(FAR const char *fmt, va_list ap) printf_like(1, 0);
|
||||
|
||||
/* Likewise, but without ": " and the standard error string. */
|
||||
|
||||
void warnx(FAR const char *fmt, ...) printflike(1, 2);
|
||||
void vwarnx(FAR const char *fmt, va_list ap) printflike(1, 0);
|
||||
void warnx(FAR const char *fmt, ...) printf_like(1, 2);
|
||||
void vwarnx(FAR const char *fmt, va_list ap) printf_like(1, 0);
|
||||
|
||||
/* Likewise, and then exit with STATUS. */
|
||||
|
||||
void err(int status, FAR const char *fmt, ...) printflike(2, 3);
|
||||
void verr(int status, FAR const char *fmt, va_list ap) printflike(2, 0);
|
||||
void errx(int status, FAR const char *fmt, ...) printflike(2, 3);
|
||||
void verrx(int status, FAR const char *, va_list ap) printflike(2, 0);
|
||||
void err(int status, FAR const char *fmt, ...) printf_like(2, 3);
|
||||
void verr(int status, FAR const char *fmt, va_list ap) printf_like(2, 0);
|
||||
void errx(int status, FAR const char *fmt, ...) printf_like(2, 3);
|
||||
void verrx(int status, FAR const char *, va_list ap) printf_like(2, 0);
|
||||
|
||||
#endif /* __INCLUDE_ERR_H */
|
||||
|
@ -40,24 +40,24 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
FAR char *gettext(FAR const char *msgid) formatlike(1);
|
||||
FAR char *gettext(FAR const char *msgid) format_like(1);
|
||||
FAR char *dgettext(FAR const char *domainname,
|
||||
FAR const char *msgid) formatlike(2);
|
||||
FAR const char *msgid) format_like(2);
|
||||
FAR char *dcgettext(FAR const char *domainname,
|
||||
FAR const char *msgid,
|
||||
int category) formatlike(2);
|
||||
int category) format_like(2);
|
||||
FAR char *ngettext(FAR const char *msgid1,
|
||||
FAR const char *msgid2,
|
||||
unsigned long int n) formatlike(1) formatlike(2);
|
||||
unsigned long int n) format_like(1) format_like(2);
|
||||
FAR char *dngettext(FAR const char *domainname,
|
||||
FAR const char *msgid1,
|
||||
FAR const char *msgid2,
|
||||
unsigned long int n) formatlike(2) formatlike(3);
|
||||
unsigned long int n) format_like(2) format_like(3);
|
||||
FAR char *dcngettext(FAR const char *domainname,
|
||||
FAR const char *msgid1,
|
||||
FAR const char *msgid2,
|
||||
unsigned long int n,
|
||||
int category) formatlike(2) formatlike(3);
|
||||
int category) format_like(2) format_like(3);
|
||||
|
||||
FAR char *textdomain(FAR const char *domainname);
|
||||
|
||||
|
@ -126,10 +126,10 @@
|
||||
# if !defined(__CYGWIN__) && !defined(CONFIG_ARCH_GNU_NO_WEAKFUNCTIONS)
|
||||
# define CONFIG_HAVE_WEAKFUNCTIONS 1
|
||||
# define weak_alias(name, aliasname) \
|
||||
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
|
||||
# define weak_data __attribute__ ((weak))
|
||||
# define weak_function __attribute__ ((weak))
|
||||
# define weak_const_function __attribute__ ((weak, __const__))
|
||||
extern __typeof(name) aliasname __attribute__((weak, alias(#name)));
|
||||
# define weak_data __attribute__((weak))
|
||||
# define weak_function __attribute__((weak))
|
||||
# define weak_const_function __attribute__((weak, __const__))
|
||||
# else
|
||||
# undef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
# define weak_alias(name, aliasname)
|
||||
@ -142,7 +142,7 @@
|
||||
* C11 adds _Noreturn keyword (see stdnoreturn.h)
|
||||
*/
|
||||
|
||||
# define noreturn_function __attribute__ ((noreturn))
|
||||
# define noreturn_function __attribute__((noreturn))
|
||||
|
||||
/* The farcall_function attribute informs GCC that is should use long calls
|
||||
* (even though -mlong-calls does not appear in the compilation options)
|
||||
@ -151,27 +151,27 @@
|
||||
# if defined(__clang__)
|
||||
# define farcall_function
|
||||
# else
|
||||
# define farcall_function __attribute__ ((long_call))
|
||||
# define farcall_function __attribute__((long_call))
|
||||
# endif
|
||||
|
||||
/* Code locate */
|
||||
|
||||
# define locate_code(n) __attribute__ ((section(n)))
|
||||
# define locate_code(n) __attribute__((section(n)))
|
||||
|
||||
/* Data alignment */
|
||||
|
||||
# define aligned_data(n) __attribute__ ((aligned(n)))
|
||||
# define aligned_data(n) __attribute__((aligned(n)))
|
||||
|
||||
/* Data location */
|
||||
|
||||
# define locate_data(n) __attribute__ ((section(n)))
|
||||
# define locate_data(n) __attribute__((section(n)))
|
||||
|
||||
/* The packed attribute informs GCC that the structure elements are packed,
|
||||
* ignoring other alignment rules.
|
||||
*/
|
||||
|
||||
# define begin_packed_struct
|
||||
# define end_packed_struct __attribute__ ((packed))
|
||||
# define end_packed_struct __attribute__((packed))
|
||||
|
||||
/* GCC does not support the reentrant attribute */
|
||||
|
||||
@ -181,23 +181,23 @@
|
||||
* the function prolog and epilog.
|
||||
*/
|
||||
|
||||
# define naked_function __attribute__ ((naked,no_instrument_function))
|
||||
# define naked_function __attribute__((naked,no_instrument_function))
|
||||
|
||||
/* The always_inline_function attribute informs GCC that the function should
|
||||
* always be inlined, regardless of the level of optimization. The
|
||||
* noinline_function indicates that the function should never be inlined.
|
||||
*/
|
||||
|
||||
# define always_inline_function __attribute__ ((always_inline,no_instrument_function))
|
||||
# define noinline_function __attribute__ ((noinline))
|
||||
# define always_inline_function __attribute__((always_inline,no_instrument_function))
|
||||
# define noinline_function __attribute__((noinline))
|
||||
|
||||
/* The noinstrument_function attribute informs GCC don't instrument it */
|
||||
|
||||
# define noinstrument_function __attribute__ ((no_instrument_function))
|
||||
# define noinstrument_function __attribute__((no_instrument_function))
|
||||
|
||||
/* The nosanitize_address attribute informs GCC don't sanitize it */
|
||||
|
||||
# define nosanitize_address __attribute__ ((no_sanitize_address))
|
||||
# define nosanitize_address __attribute__((no_sanitize_address))
|
||||
|
||||
/* The nosanitize_undefined attribute informs GCC don't sanitize it */
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
# if defined(__has_attribute)
|
||||
# if __has_attribute(no_stack_protector)
|
||||
# define nostackprotect_function __attribute__ ((no_stack_protector))
|
||||
# define nostackprotect_function __attribute__((no_stack_protector))
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@ -220,9 +220,9 @@
|
||||
|
||||
# ifndef nostackprotect_function
|
||||
# if defined(__clang__)
|
||||
# define nostackprotect_function __attribute__ ((optnone))
|
||||
# define nostackprotect_function __attribute__((optnone))
|
||||
# else
|
||||
# define nostackprotect_function __attribute__ ((__optimize__("-fno-stack-protector")))
|
||||
# define nostackprotect_function __attribute__((__optimize__("-fno-stack-protector")))
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@ -260,11 +260,11 @@
|
||||
# define __syslog__ __printf__
|
||||
# endif
|
||||
|
||||
# define formatlike(a) __attribute__((__format_arg__ (a)))
|
||||
# define printflike(a, b) __attribute__((__format__ (__printf__, a, b)))
|
||||
# define sysloglike(a, b) __attribute__((__format__ (__syslog__, a, b)))
|
||||
# define scanflike(a, b) __attribute__((__format__ (__scanf__, a, b)))
|
||||
# define strftimelike(a) __attribute__((__format__ (__strftime__, a, 0)))
|
||||
# define format_like(a) __attribute__((__format_arg__(a)))
|
||||
# define printf_like(a, b) __attribute__((__format__(__printf__, a, b)))
|
||||
# define syslog_like(a, b) __attribute__((__format__(__syslog__, a, b)))
|
||||
# define scanf_like(a, b) __attribute__((__format__(__scanf__, a, b)))
|
||||
# define strftime_like(a) __attribute__((__format__(__strftime__, a, 0)))
|
||||
|
||||
/* GCC does not use storage classes to qualify addressing */
|
||||
|
||||
@ -506,11 +506,11 @@
|
||||
# define malloc_like2(a, b)
|
||||
# define realloc_like(a)
|
||||
|
||||
# define formatlike(a)
|
||||
# define printflike(a, b)
|
||||
# define sysloglike(a, b)
|
||||
# define scanflike(a, b)
|
||||
# define strftimelike(a)
|
||||
# define format_like(a)
|
||||
# define printf_like(a, b)
|
||||
# define syslog_like(a, b)
|
||||
# define scanf_like(a, b)
|
||||
# define strftime_like(a)
|
||||
|
||||
/* The reentrant attribute informs SDCC that the function
|
||||
* must be reentrant. In this case, SDCC will store input
|
||||
@ -643,11 +643,11 @@
|
||||
# define malloc_like1(a)
|
||||
# define malloc_like2(a, b)
|
||||
# define realloc_like(a)
|
||||
# define formatlike(a)
|
||||
# define printflike(a, b)
|
||||
# define sysloglike(a, b)
|
||||
# define scanflike(a, b)
|
||||
# define strftimelike(a)
|
||||
# define format_like(a)
|
||||
# define printf_like(a, b)
|
||||
# define syslog_like(a, b)
|
||||
# define scanf_like(a, b)
|
||||
# define strftime_like(a)
|
||||
|
||||
/* REVISIT: */
|
||||
|
||||
@ -751,11 +751,11 @@
|
||||
# define malloc_like1(a)
|
||||
# define malloc_like2(a, b)
|
||||
# define realloc_like(a)
|
||||
# define formatlike(a)
|
||||
# define printflike(a, b)
|
||||
# define sysloglike(a, b)
|
||||
# define scanflike(a, b)
|
||||
# define strftimelike(a)
|
||||
# define format_like(a)
|
||||
# define printf_like(a, b)
|
||||
# define syslog_like(a, b)
|
||||
# define scanf_like(a, b)
|
||||
# define strftime_like(a)
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
@ -838,11 +838,11 @@
|
||||
# define malloc_like1(a)
|
||||
# define malloc_like2(a, b)
|
||||
# define realloc_like(a)
|
||||
# define formatlike(a)
|
||||
# define printflike(a, b)
|
||||
# define sysloglike(a, b)
|
||||
# define scanflike(a, b)
|
||||
# define strftimelike(a)
|
||||
# define format_like(a)
|
||||
# define printf_like(a, b)
|
||||
# define syslog_like(a, b)
|
||||
# define scanf_like(a, b)
|
||||
# define strftime_like(a)
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
@ -900,11 +900,11 @@
|
||||
# define malloc_like1(a)
|
||||
# define malloc_like2(a, b)
|
||||
# define realloc_like(a)
|
||||
# define formatlike(a)
|
||||
# define printflike(a, b)
|
||||
# define sysloglike(a, b)
|
||||
# define scanflike(a, b)
|
||||
# define strftimelike(a)
|
||||
# define format_like(a)
|
||||
# define printf_like(a, b)
|
||||
# define syslog_like(a, b)
|
||||
# define scanf_like(a, b)
|
||||
# define strftime_like(a)
|
||||
|
||||
# define FAR
|
||||
# define NEAR
|
||||
|
@ -220,7 +220,7 @@ size_t procfs_memcpy(FAR const char *src, size_t srclen,
|
||||
****************************************************************************/
|
||||
|
||||
int procfs_snprintf(FAR char *buf, size_t size,
|
||||
FAR const IPTR char *format, ...) printflike(3, 4);
|
||||
FAR const IPTR char *format, ...) printf_like(3, 4);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: procfs_register
|
||||
|
@ -539,13 +539,13 @@ void sched_note_string(uintptr_t ip, FAR const char *buf);
|
||||
void sched_note_dump(uintptr_t ip, uint8_t event,
|
||||
FAR const void *buf, size_t len);
|
||||
void sched_note_vprintf(uintptr_t ip, FAR const char *fmt,
|
||||
va_list va) printflike(2, 0);
|
||||
va_list va) printf_like(2, 0);
|
||||
void sched_note_vbprintf(uintptr_t ip, uint8_t event,
|
||||
FAR const char *fmt, va_list va) printflike(3, 0);
|
||||
FAR const char *fmt, va_list va) printf_like(3, 0);
|
||||
void sched_note_printf(uintptr_t ip,
|
||||
FAR const char *fmt, ...) printflike(2, 3);
|
||||
FAR const char *fmt, ...) printf_like(2, 3);
|
||||
void sched_note_bprintf(uintptr_t ip, uint8_t event,
|
||||
FAR const char *fmt, ...) printflike(3, 4);
|
||||
FAR const char *fmt, ...) printf_like(3, 4);
|
||||
#else
|
||||
# define sched_note_string(ip,b)
|
||||
# define sched_note_dump(ip,e,b,l)
|
||||
|
@ -600,7 +600,7 @@ int lib_snoflush(FAR struct lib_sostream_s *this);
|
||||
****************************************************************************/
|
||||
|
||||
int lib_sprintf(FAR struct lib_outstream_s *obj,
|
||||
FAR const IPTR char *fmt, ...) printflike(2, 3);
|
||||
FAR const IPTR char *fmt, ...) printf_like(2, 3);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_vsprintf
|
||||
@ -612,7 +612,7 @@ int lib_sprintf(FAR struct lib_outstream_s *obj,
|
||||
****************************************************************************/
|
||||
|
||||
int lib_vsprintf(FAR struct lib_outstream_s *obj,
|
||||
FAR const IPTR char *src, va_list ap) printflike(2, 0);
|
||||
FAR const IPTR char *src, va_list ap) printf_like(2, 0);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_vscanf
|
||||
@ -624,7 +624,7 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj,
|
||||
****************************************************************************/
|
||||
|
||||
int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
|
||||
FAR const IPTR char *src, va_list ap) scanflike(3, 0);
|
||||
FAR const IPTR char *src, va_list ap) scanf_like(3, 0);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
@ -419,7 +419,7 @@ typedef uint16_t usbtrace_idset_t;
|
||||
|
||||
/* Print routine to use for usbdev_trprint() output */
|
||||
|
||||
typedef CODE int (*trprintf_t)(const char *fmt, ...) printflike(1, 2);
|
||||
typedef CODE int (*trprintf_t)(const char *fmt, ...) printf_like(1, 2);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
|
@ -432,7 +432,7 @@ size_t obstack_room(FAR struct obstack *h);
|
||||
****************************************************************************/
|
||||
|
||||
int obstack_printf(FAR struct obstack *h, FAR const char *fmt, ...)
|
||||
printflike(2, 3);
|
||||
printf_like(2, 3);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: obstack_vprintf
|
||||
@ -456,7 +456,7 @@ int obstack_printf(FAR struct obstack *h, FAR const char *fmt, ...)
|
||||
****************************************************************************/
|
||||
|
||||
int obstack_vprintf(FAR struct obstack *h, FAR const char *fmt, va_list ap)
|
||||
printflike(2, 0);
|
||||
printf_like(2, 0);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: obstack_alloc_failed_handler
|
||||
|
@ -145,14 +145,14 @@ int fgetpos(FAR FILE *stream, FAR fpos_t *pos);
|
||||
FAR char *fgets(FAR char *s, int n, FAR FILE *stream);
|
||||
FAR FILE *fopen(FAR const char *path, FAR const char *type) fopen_like;
|
||||
int fprintf(FAR FILE *stream, FAR const IPTR char *format, ...)
|
||||
printflike(2, 3);
|
||||
printf_like(2, 3);
|
||||
int fputc(int c, FAR FILE *stream);
|
||||
int fputs(FAR const IPTR char *s, FAR FILE *stream);
|
||||
size_t fread(FAR void *ptr, size_t size, size_t n_items, FAR FILE *stream);
|
||||
FAR FILE *freopen(FAR const char *path, FAR const char *mode,
|
||||
FAR FILE *stream);
|
||||
int fscanf(FAR FILE *stream, FAR const IPTR char *fmt, ...)
|
||||
scanflike(2, 3);
|
||||
scanf_like(2, 3);
|
||||
int fseek(FAR FILE *stream, long int offset, int whence);
|
||||
int fseeko(FAR FILE *stream, off_t offset, int whence);
|
||||
int fsetpos(FAR FILE *stream, FAR fpos_t *pos);
|
||||
@ -183,35 +183,35 @@ void funlockfile(FAR FILE *stream);
|
||||
*/
|
||||
|
||||
void perror(FAR const char *s);
|
||||
int printf(FAR const IPTR char *fmt, ...) printflike(1, 2);
|
||||
int printf(FAR const IPTR char *fmt, ...) printf_like(1, 2);
|
||||
int putc(int c, FAR FILE *stream);
|
||||
int putchar(int c);
|
||||
int puts(FAR const IPTR char *s);
|
||||
int rename(FAR const char *oldpath, FAR const char *newpath);
|
||||
int sprintf(FAR char *buf, FAR const IPTR char *fmt, ...)
|
||||
printflike(2, 3);
|
||||
printf_like(2, 3);
|
||||
int asprintf(FAR char **ptr, FAR const IPTR char *fmt, ...)
|
||||
printflike(2, 3);
|
||||
printf_like(2, 3);
|
||||
int snprintf(FAR char *buf, size_t size,
|
||||
FAR const IPTR char *fmt, ...) printflike(3, 4);
|
||||
FAR const IPTR char *fmt, ...) printf_like(3, 4);
|
||||
int sscanf(FAR const char *buf, FAR const IPTR char *fmt, ...)
|
||||
scanflike(2, 3);
|
||||
scanf_like(2, 3);
|
||||
|
||||
int scanf(FAR const IPTR char *fmt, ...) scanflike(1, 2);
|
||||
int scanf(FAR const IPTR char *fmt, ...) scanf_like(1, 2);
|
||||
int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, va_list ap)
|
||||
printflike(2, 0);
|
||||
printf_like(2, 0);
|
||||
int vfprintf(FAR FILE *stream, FAR const IPTR char *fmt,
|
||||
va_list ap) printflike(2, 0);
|
||||
va_list ap) printf_like(2, 0);
|
||||
int vfscanf(FAR FILE *stream, FAR const IPTR char *fmt, va_list ap)
|
||||
scanflike(2, 0);
|
||||
int vprintf(FAR const IPTR char *fmt, va_list ap) printflike(1, 0);
|
||||
int vscanf(FAR const IPTR char *fmt, va_list ap) scanflike(1, 0);
|
||||
scanf_like(2, 0);
|
||||
int vprintf(FAR const IPTR char *fmt, va_list ap) printf_like(1, 0);
|
||||
int vscanf(FAR const IPTR char *fmt, va_list ap) scanf_like(1, 0);
|
||||
int vsnprintf(FAR char *buf, size_t size, FAR const IPTR char *fmt,
|
||||
va_list ap) printflike(3, 0);
|
||||
va_list ap) printf_like(3, 0);
|
||||
int vsprintf(FAR char *buf, FAR const IPTR char *fmt, va_list ap)
|
||||
printflike(2, 0);
|
||||
printf_like(2, 0);
|
||||
int vsscanf(FAR const char *buf, FAR const IPTR char *fmt, va_list ap)
|
||||
scanflike(2, 0);
|
||||
scanf_like(2, 0);
|
||||
|
||||
/* Operations on file descriptors including:
|
||||
*
|
||||
@ -221,9 +221,9 @@ int vsscanf(FAR const char *buf, FAR const IPTR char *fmt, va_list ap)
|
||||
*/
|
||||
|
||||
FAR FILE *fdopen(int fd, FAR const char *type) fopen_like;
|
||||
int dprintf(int fd, FAR const IPTR char *fmt, ...) printflike(2, 3);
|
||||
int dprintf(int fd, FAR const IPTR char *fmt, ...) printf_like(2, 3);
|
||||
int vdprintf(int fd, FAR const IPTR char *fmt, va_list ap)
|
||||
printflike(2, 0);
|
||||
printf_like(2, 0);
|
||||
|
||||
/* Operations on paths */
|
||||
|
||||
|
@ -198,9 +198,9 @@ void closelog(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void syslog(int priority, FAR const IPTR char *fmt, ...) sysloglike(2, 3);
|
||||
void syslog(int priority, FAR const IPTR char *fmt, ...) syslog_like(2, 3);
|
||||
void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
|
||||
sysloglike(2, 0);
|
||||
syslog_like(2, 0);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setlogmask
|
||||
|
@ -203,7 +203,7 @@ FAR struct tm *localtime(FAR const time_t *timep);
|
||||
FAR struct tm *localtime_r(FAR const time_t *timep, FAR struct tm *result);
|
||||
|
||||
size_t strftime(FAR char *s, size_t max, FAR const char *format,
|
||||
FAR const struct tm *tm) strftimelike(3);
|
||||
FAR const struct tm *tm) strftime_like(3);
|
||||
FAR char *strptime(FAR const char *s, FAR const char *format,
|
||||
FAR struct tm *tm);
|
||||
|
||||
|
@ -146,7 +146,7 @@ static const char g_nullstring[] = "(null)";
|
||||
static int vsprintf_internal(FAR struct lib_outstream_s *stream,
|
||||
FAR struct arg_s *arglist, int numargs,
|
||||
FAR const IPTR char *fmt, va_list ap)
|
||||
printflike(4, 0);
|
||||
printf_like(4, 0);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
|
@ -128,7 +128,7 @@ struct route_info_s
|
||||
/* Helpers */
|
||||
|
||||
static void route_sprintf(FAR struct route_info_s *info,
|
||||
FAR const char *fmt, ...) printflike(2, 3);
|
||||
FAR const char *fmt, ...) printf_like(2, 3);
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
static int route_ipv4_entry(FAR struct net_route_ipv4_s *route,
|
||||
FAR void *arg);
|
||||
|
@ -1069,7 +1069,7 @@ config SCHED_INSTRUMENTATION_DUMP
|
||||
void sched_note_dump(uint32_t module, uint8_t event, FAR const void *buf, size_t len);
|
||||
void sched_note_vprintf(FAR const char *fmt, va_list va);
|
||||
void sched_note_vbprintf(uint32_t module, uint8_t event, FAR const char *fmt, va_list va);
|
||||
void sched_note_printf(FAR const char *fmt, ...) printflike(1, 2);
|
||||
void sched_note_printf(FAR const char *fmt, ...) printf_like(1, 2);
|
||||
void sched_note_bprintf(uint32_t module, uint8_t event, FAR const char *fmt, ...);
|
||||
|
||||
config SCHED_INSTRUMENTATION_HIRES
|
||||
|
Loading…
x
Reference in New Issue
Block a user