Fixed compiler warnings

This commit is contained in:
Monty 2015-11-23 19:56:03 +02:00
parent 2553f143fd
commit 72dc30f217
5 changed files with 5 additions and 7 deletions

View File

@ -129,10 +129,6 @@ static void mysql_close_free(MYSQL *mysql);
static void mysql_prune_stmt_list(MYSQL *mysql); static void mysql_prune_stmt_list(MYSQL *mysql);
static int cli_report_progress(MYSQL *mysql, char *packet, uint length); static int cli_report_progress(MYSQL *mysql, char *packet, uint length);
#if !defined(__WIN__)
static int wait_for_data(my_socket fd, uint timeout);
#endif
CHARSET_INFO *default_client_charset_info = &my_charset_latin1; CHARSET_INFO *default_client_charset_info = &my_charset_latin1;
/* Server error code and message */ /* Server error code and message */

View File

@ -3557,9 +3557,9 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
break; break;
bitmap_set_bit(&handled_columns, key_part->fieldnr-1); bitmap_set_bit(&handled_columns, key_part->fieldnr-1);
} }
double selectivity_mult;
if (i) if (i)
{ {
double UNINIT_VAR(selectivity_mult);
/* /*
There is at least 1-column prefix of columns whose selectivity has There is at least 1-column prefix of columns whose selectivity has
not yet been accounted for. not yet been accounted for.

View File

@ -122,7 +122,7 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
int res; int res;
bool did_enter_cond= false; bool did_enter_cond= false;
PSI_stage_info old_stage; PSI_stage_info old_stage;
THD *thd; THD *UNINIT_VAR(thd);
Relay_log_info *rli= rgi->rli; Relay_log_info *rli= rgi->rli;
mysql_mutex_lock(&LOCK_slave_state); mysql_mutex_lock(&LOCK_slave_state);

View File

@ -23479,7 +23479,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table,
bool need_order, bool distinct, bool need_order, bool distinct,
const char *message) const char *message)
{ {
Explain_node *explain_node; Explain_node *UNINIT_VAR(explain_node);
JOIN *join= this; /* Legacy: this code used to be a non-member function */ JOIN *join= this; /* Legacy: this code used to be a non-member function */
THD *thd=join->thd; THD *thd=join->thd;
const CHARSET_INFO *cs= system_charset_info; const CHARSET_INFO *cs= system_charset_info;

View File

@ -172,6 +172,7 @@ static inline uint32_t get_len_of_offsets(KEY_AND_COL_INFO* kc_info, TABLE_SHARE
} }
#ifdef NOT_USED
static int get_thread_query_string(my_thread_id id, String &qs) { static int get_thread_query_string(my_thread_id id, String &qs) {
mysql_mutex_lock(&LOCK_thread_count); mysql_mutex_lock(&LOCK_thread_count);
I_List_iterator<THD> it(threads); I_List_iterator<THD> it(threads);
@ -196,6 +197,7 @@ static int get_thread_query_string(my_thread_id id, String &qs) {
mysql_mutex_unlock(&LOCK_thread_count); mysql_mutex_unlock(&LOCK_thread_count);
return 0; return 0;
} }
#endif
static int allocate_key_and_col_info ( TABLE_SHARE* table_share, KEY_AND_COL_INFO* kc_info) { static int allocate_key_and_col_info ( TABLE_SHARE* table_share, KEY_AND_COL_INFO* kc_info) {
int error; int error;