1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00

Tag ALL my_error_reporters with ATTRIBUTE_FORMAT

The function pointer typedef `my_error_reporter` is already tagged.
This commit inherits this attribute to all `my_getopt_error_reporter`s
and `my_charset_error_reporter`s for consistency.
(It future-proofs for deliberate direct uses of those functions.)
This commit is contained in:
ParadoxV5
2024-08-12 20:23:21 -06:00
committed by Sergei Golubchik
parent 1c315b3fb1
commit 63b0ee26f7
3 changed files with 5 additions and 2 deletions

View File

@@ -477,7 +477,7 @@ static int add_collation(struct charset_info_st *cs)
Report character set initialization errors and warnings.
Be silent by default: no warnings on the client side.
*/
static void
ATTRIBUTE_FORMAT(printf, 2, 3) static void
default_reporter(enum loglevel level __attribute__ ((unused)),
const char *format __attribute__ ((unused)),
...)

View File

@@ -86,6 +86,7 @@ my_bool my_handle_options_init_variables = 1;
my_getopt_value my_getopt_get_addr= 0;
ATTRIBUTE_FORMAT(printf, 2, 3)
static void default_reporter(enum loglevel level, const char *format, ...)
{
va_list args;

View File

@@ -1435,6 +1435,7 @@ C_MODE_START
@param level log message level
@param format log message format string
*/
ATTRIBUTE_FORMAT(printf, 2, 3)
static void buffered_option_error_reporter(enum loglevel level,
const char *format, ...)
{
@@ -1465,6 +1466,7 @@ static void buffered_option_error_reporter(enum loglevel level,
to print general character set subsystem initialization errors,
such as Index.xml syntax problems, bad XML tag hierarchy, etc.
*/
ATTRIBUTE_FORMAT(printf, 2, 3)
static void charset_error_reporter(enum loglevel level,
const char *format, ...)
{
@@ -8720,7 +8722,7 @@ mysql_getopt_value(const char *name, uint length,
return option->value;
}
ATTRIBUTE_FORMAT(printf, 2, 3)
static void option_error_reporter(enum loglevel level, const char *format, ...)
{
va_list args;