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

Tag my_vsnprintf.c with ATTRIBUTE_FORMAT

[Breaking]
Good news:
GCC now checks your `my_snprintf` (direct) calls (`-Wformat` was on);
Bad news:
The build process no longer lets your incorrect
formats/arguments sneak past (`-Werror` was also on).

As such, this commit also migrates all direct `my_snprintf` calls from
the old specifiers to MDEV-21978’s new `-Wformat`-compatible suffixes.
The next commits will cover non-direct calls to `my_snprintf`.
(I call them “`my_snprintf` descendants”.)

This commit does not update the ABI records because
there’re more ABI “changes” to come – half a dozen
`include/mysql/plugin_*.h.pp`s are now missing the new `__attribute__`s.
This commit is contained in:
ParadoxV5
2024-06-28 20:48:51 -06:00
committed by Sergei Golubchik
parent f3617981ad
commit 5100773ab9
10 changed files with 36 additions and 27 deletions

View File

@@ -631,7 +631,7 @@ print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev)
return;
// In case of rewrite rule print USE statement for db_to
my_fprintf(result_file, "use %`s%s\n", db_to, pinfo->delimiter);
my_fprintf(result_file, "use %sQ%s\n", db_to, pinfo->delimiter);
// Copy the *original* db to pinfo to suppress emitting
// of USE stmts by log_event print-functions.