mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Tag ALL my_error_reporter
s 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:
committed by
Sergei Golubchik
parent
1c315b3fb1
commit
63b0ee26f7
@@ -477,7 +477,7 @@ static int add_collation(struct charset_info_st *cs)
|
|||||||
Report character set initialization errors and warnings.
|
Report character set initialization errors and warnings.
|
||||||
Be silent by default: no warnings on the client side.
|
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)),
|
default_reporter(enum loglevel level __attribute__ ((unused)),
|
||||||
const char *format __attribute__ ((unused)),
|
const char *format __attribute__ ((unused)),
|
||||||
...)
|
...)
|
||||||
|
@@ -86,6 +86,7 @@ my_bool my_handle_options_init_variables = 1;
|
|||||||
|
|
||||||
my_getopt_value my_getopt_get_addr= 0;
|
my_getopt_value my_getopt_get_addr= 0;
|
||||||
|
|
||||||
|
ATTRIBUTE_FORMAT(printf, 2, 3)
|
||||||
static void default_reporter(enum loglevel level, const char *format, ...)
|
static void default_reporter(enum loglevel level, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@@ -1435,6 +1435,7 @@ C_MODE_START
|
|||||||
@param level log message level
|
@param level log message level
|
||||||
@param format log message format string
|
@param format log message format string
|
||||||
*/
|
*/
|
||||||
|
ATTRIBUTE_FORMAT(printf, 2, 3)
|
||||||
static void buffered_option_error_reporter(enum loglevel level,
|
static void buffered_option_error_reporter(enum loglevel level,
|
||||||
const char *format, ...)
|
const char *format, ...)
|
||||||
{
|
{
|
||||||
@@ -1465,6 +1466,7 @@ static void buffered_option_error_reporter(enum loglevel level,
|
|||||||
to print general character set subsystem initialization errors,
|
to print general character set subsystem initialization errors,
|
||||||
such as Index.xml syntax problems, bad XML tag hierarchy, etc.
|
such as Index.xml syntax problems, bad XML tag hierarchy, etc.
|
||||||
*/
|
*/
|
||||||
|
ATTRIBUTE_FORMAT(printf, 2, 3)
|
||||||
static void charset_error_reporter(enum loglevel level,
|
static void charset_error_reporter(enum loglevel level,
|
||||||
const char *format, ...)
|
const char *format, ...)
|
||||||
{
|
{
|
||||||
@@ -8720,7 +8722,7 @@ mysql_getopt_value(const char *name, uint length,
|
|||||||
return option->value;
|
return option->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ATTRIBUTE_FORMAT(printf, 2, 3)
|
||||||
static void option_error_reporter(enum loglevel level, const char *format, ...)
|
static void option_error_reporter(enum loglevel level, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
Reference in New Issue
Block a user