uh_log_xx: check the arguments like printf

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
main^2
Jianhui Zhao 2021-01-15 15:40:21 +08:00
parent b0d35ed4fb
commit fa6248b1f1
1 changed files with 2 additions and 1 deletions

View File

@ -40,6 +40,7 @@ void uh_log_close();
#define uh_log_info(fmt...) uh_log(LOG_INFO, fmt) #define uh_log_info(fmt...) uh_log(LOG_INFO, fmt)
#define uh_log_err(fmt...) uh_log(LOG_ERR, fmt) #define uh_log_err(fmt...) uh_log(LOG_ERR, fmt)
void __uh_log(const char *filename, int line, int priority, const char *fmt, ...); void __uh_log(const char *filename, int line, int priority, const char *fmt, ...)
__attribute__((format(printf, 4, 5)));
#endif #endif