From be127f53e4c5894f1efd8f478acc22b94944e86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Mon, 12 Dec 2022 13:09:44 +0100 Subject: [PATCH] Add compiler format check pragma to 'proxy_error_func' and 'proxy_debug_func' --- include/proxysql.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/proxysql.h b/include/proxysql.h index 361b9e740..8b5c84e48 100644 --- a/include/proxysql.h +++ b/include/proxysql.h @@ -108,6 +108,7 @@ int pkt_end(unsigned char *, unsigned int); int pkt_com_query(unsigned char *, unsigned int); enum MySQL_response_type mysql_response(unsigned char *, unsigned int); +__attribute__((__format__ (__printf__, 2, 3))) void proxy_error_func(int errcode, const char *, ...); void print_backtrace(void); void proxy_info_(const char* msg, ...); @@ -115,6 +116,7 @@ void proxy_info_(const char* msg, ...); #ifdef DEBUG void init_debug_struct(); void init_debug_struct_from_cmdline(); +__attribute__((__format__ (__printf__, 7, 8))) void proxy_debug_func(enum debug_module, int, int, const char *, int, const char *, const char *, ...); void proxy_debug_get_filters(std::set&); void proxy_debug_load_filters(std::set&);