1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Tag rest of my_vsnprintf users w/ ATTRIBUTE_FORMAT

This commit is the final batch of #3360’s `ATTRIBUTE_FORMAT` process,
covering various insignificant (as in, requires few-to-no
changes in addition to gaining this attribute) functions.

One of the main focus of this PR is to enable GCC `-Wformat` (by tagging
`ATTRIBUTE_FORMAT`) on ALL `my_snprintf` utilities. To be throughout,
functions that delegate to `my_vsnprintf` must also inherit this
attribute because `-Wformat` doesn’t trace argument across call stacks.
This commit is contained in:
ParadoxV5
2024-10-13 19:27:37 -06:00
committed by Sergei Golubchik
parent 63b0ee26f7
commit c8783757d6
6 changed files with 13 additions and 7 deletions

View File

@@ -109,7 +109,8 @@ void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
const char *err);
void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
void set_mysql_extended_error(MYSQL *mysql, int errcode, const char *sqlstate,
const char *format, ...);
const char *format, ...)
ATTRIBUTE_FORMAT(printf, 4, 5);
/* client side of the pluggable authentication */
struct st_vio;