mirror of https://github.com/ARMmbed/mbed-os.git
Add format checking to mbed_error_printf
parent
8976709c9c
commit
1f56fbe397
|
@ -871,7 +871,7 @@ typedef struct _mbed_error_ctx {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MBED_NORETURN void error(const char *format, ...);
|
MBED_NORETURN void error(const char *format, ...) MBED_PRINTF(1, 2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this Macro to generate a mbed_error_status_t value for a System error
|
* Call this Macro to generate a mbed_error_status_t value for a System error
|
||||||
|
|
|
@ -139,7 +139,7 @@ MBED_NORETURN void mbed_die(void);
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void mbed_error_printf(const char *format, ...);
|
void mbed_error_printf(const char *format, ...) MBED_PRINTF(1, 2);
|
||||||
|
|
||||||
/** Print out an error message. Similar to mbed_error_printf
|
/** Print out an error message. Similar to mbed_error_printf
|
||||||
* but uses a va_list.
|
* but uses a va_list.
|
||||||
|
@ -150,7 +150,7 @@ void mbed_error_printf(const char *format, ...);
|
||||||
* @param arg Variable arguments list
|
* @param arg Variable arguments list
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void mbed_error_vprintf(const char *format, va_list arg);
|
void mbed_error_vprintf(const char *format, va_list arg) MBED_PRINTF(1, 0);
|
||||||
|
|
||||||
/** Print out an error message. This is typically called when
|
/** Print out an error message. This is typically called when
|
||||||
* handling a crash.
|
* handling a crash.
|
||||||
|
@ -169,7 +169,7 @@ void mbed_error_puts(const char *str);
|
||||||
/** @deprecated Renamed to mbed_error_vprintf to match functionality */
|
/** @deprecated Renamed to mbed_error_vprintf to match functionality */
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.11",
|
MBED_DEPRECATED_SINCE("mbed-os-5.11",
|
||||||
"Renamed to mbed_error_vprintf to match functionality.")
|
"Renamed to mbed_error_vprintf to match functionality.")
|
||||||
void mbed_error_vfprintf(const char *format, va_list arg);
|
void mbed_error_vfprintf(const char *format, va_list arg) MBED_PRINTF(1, 0);
|
||||||
/** @}*/
|
/** @}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue