mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Update my_snprintf
’s last loose ends to suffixes
Migrate `mysys/errors.c`, `sql-common/errmsg.c` and a couple of insignificant loose ends to use suffix-based, `-Wformat`-compatible `my_snprintf` format extensions introduced in MDEV-21978 This commit is the final batch of MDEV-21978’s migration process. While GCC `-Wformat` (with `ATTRIBUTE_FORMAT`) can catch obsolete or malformed format string literals, formats originating from other sources (such as those strings headers) (still) require manual review. Thus, after all the automatic `-Wformat` complaints fixed in previous commits, I’ve done a manual `grep` and caught these final matches.
This commit is contained in:
committed by
Sergei Golubchik
parent
5de8e2dde3
commit
1c4aed7c68
@@ -10556,7 +10556,7 @@ const char *online_alter_check_supported(THD *thd,
|
||||
LEX_CSTRING nxvl{STRING_WITH_LEN("NEXTVAL()")};
|
||||
size_t len= strlen(fmt) + nxvl.length + c.field_name.length + dflt.length;
|
||||
char *resp= thd->alloc(len);
|
||||
// expression %s cannot be used in the %s clause of %`s
|
||||
// expression %s cannot be used in the %s clause of %sQ
|
||||
my_snprintf(resp, len, fmt, nxvl.str, dflt.str, c.field_name.str);
|
||||
return resp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user