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

Make maria_data_root const char*

This allow one to remove some casts like:
maria_data_root= (char *)".";

It also removes warnings from icc.
This commit is contained in:
Monty
2021-02-05 15:48:45 +02:00
parent 5d6ad2ad66
commit bd5ac03896
12 changed files with 30 additions and 20 deletions

View File

@@ -313,6 +313,12 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd,
const type def_val; \
} MYSQL_SYSVAR_NAME(name)
#define DECLARE_MYSQL_SYSVAR_CONST_BASIC(name, type) struct { \
MYSQL_PLUGIN_VAR_HEADER; \
const type *value; \
const type def_val; \
} MYSQL_SYSVAR_NAME(name)
#define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \
MYSQL_PLUGIN_VAR_HEADER; \
type *value; type def_val; \
@@ -367,6 +373,11 @@ DECLARE_MYSQL_SYSVAR_BASIC(name, char *) = { \
PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def}
#define MYSQL_SYSVAR_CONST_STR(name, varname, opt, comment, check, update, def) \
DECLARE_MYSQL_SYSVAR_CONST_BASIC(name, char *) = { \
PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def}
#define MYSQL_SYSVAR_INT(name, varname, opt, comment, check, update, def, min, max, blk) \
DECLARE_MYSQL_SYSVAR_SIMPLE(name, int) = { \
PLUGIN_VAR_INT | ((opt) & PLUGIN_VAR_MASK), \