mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
fixes for gcc 4.4.1 warnings
This commit is contained in:
parent
e3dfbdfd3d
commit
bc54791010
5 changed files with 19 additions and 17 deletions
|
@ -235,6 +235,7 @@ typedef struct my_locale_errmsgs
|
|||
|
||||
extern char err_shared_dir[];
|
||||
|
||||
/** @note Keep this a POD-type because we use offsetof() on it */
|
||||
typedef struct my_locale_st
|
||||
{
|
||||
uint number;
|
||||
|
|
|
@ -928,8 +928,6 @@ static bool add_terminator(DYNAMIC_ARRAY *options);
|
|||
extern "C" my_bool mysqld_get_one_option(int, const struct my_option *, char *);
|
||||
static void set_server_version(void);
|
||||
static int init_thread_environment();
|
||||
static void init_error_log_mutex();
|
||||
static void clean_up_error_log_mutex();
|
||||
static char *get_relative_path(const char *path);
|
||||
static int fix_paths(void);
|
||||
void handle_connections_sockets();
|
||||
|
@ -1346,6 +1344,18 @@ extern "C" sig_handler print_signal_warning(int sig)
|
|||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
|
||||
static void init_error_log_mutex()
|
||||
{
|
||||
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
|
||||
}
|
||||
|
||||
|
||||
static void clean_up_error_log_mutex()
|
||||
{
|
||||
mysql_mutex_destroy(&LOCK_error_log);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
cleanup all memory and end program nicely.
|
||||
|
||||
|
@ -3360,7 +3370,7 @@ static int init_common_variables()
|
|||
set the def_value member to 0 in my_long_options and initialize it
|
||||
to the correct value here.
|
||||
*/
|
||||
default_storage_engine="MyISAM";
|
||||
default_storage_engine= const_cast<char *>("MyISAM");
|
||||
|
||||
/*
|
||||
Add server status variables to the dynamic list of
|
||||
|
@ -3701,15 +3711,6 @@ You should consider changing lower_case_table_names to 1 or 2",
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void init_error_log_mutex()
|
||||
{
|
||||
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
|
||||
}
|
||||
|
||||
static void clean_up_error_log_mutex()
|
||||
{
|
||||
mysql_mutex_destroy(&LOCK_error_log);
|
||||
}
|
||||
|
||||
static int init_thread_environment()
|
||||
{
|
||||
|
|
|
@ -4378,7 +4378,7 @@ best_access_path(JOIN *join,
|
|||
*/
|
||||
if (table->quick_keys.is_set(key) &&
|
||||
(const_part & ((1 << table->quick_key_parts[key])-1)) ==
|
||||
((1 << table->quick_key_parts[key])-1) &&
|
||||
(((key_part_map)1 << table->quick_key_parts[key])-1) &&
|
||||
table->quick_n_ranges[key] == 1 &&
|
||||
records > (double) table->quick_rows[key])
|
||||
{
|
||||
|
|
|
@ -9218,8 +9218,8 @@ table_factor:
|
|||
lex->pop_context();
|
||||
lex->nest_level--;
|
||||
}
|
||||
else if ($3->select_lex &&
|
||||
$3->select_lex->master_unit()->is_union() || $5)
|
||||
else if (($3->select_lex &&
|
||||
$3->select_lex->master_unit()->is_union()) || $5)
|
||||
{
|
||||
/* simple nested joins cannot have aliases or unions */
|
||||
my_parse_error(ER(ER_SYNTAX_ERROR));
|
||||
|
|
|
@ -2956,14 +2956,14 @@ static bool check_locale(sys_var *self, THD *thd, set_var *var)
|
|||
static Sys_var_struct Sys_lc_messages(
|
||||
"lc_messages", "Set the language used for the error messages",
|
||||
SESSION_VAR(lc_messages), NO_CMD_LINE,
|
||||
offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages),
|
||||
my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_locale));
|
||||
|
||||
static Sys_var_struct Sys_lc_time_names(
|
||||
"lc_time_names", "Set the language used for the month "
|
||||
"names and the days of the week",
|
||||
SESSION_VAR(lc_time_names), NO_CMD_LINE,
|
||||
offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names),
|
||||
my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names),
|
||||
NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_locale));
|
||||
|
||||
static Sys_var_tz Sys_time_zone(
|
||||
|
|
Loading…
Reference in a new issue