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

@@ -711,7 +711,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
protocol->store(&table_name, system_charset_info);
protocol->store(operator_name, system_charset_info);
protocol->store(&error_clex_str, system_charset_info);
length= my_snprintf(buff, sizeof(buff),
length= my_snprintf(buff, sizeof(buff), "%s",
ER_THD(thd, ER_PARTITION_DOES_NOT_EXIST));
protocol->store(buff, length, system_charset_info);
if(protocol->write())