summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/create_options.cc3
-rw-r--r--sql/debug_sync.cc3
-rw-r--r--sql/derror.cc4
-rw-r--r--sql/event_db_repository.cc4
-rw-r--r--sql/handler.cc3
-rw-r--r--sql/item_cmpfunc.cc3
-rw-r--r--sql/item_strfunc.cc9
-rw-r--r--sql/key.cc18
-rw-r--r--sql/log.cc18
-rw-r--r--sql/log_event.cc9
-rw-r--r--sql/multi_range_read.cc3
-rw-r--r--sql/mysqld.cc12
-rw-r--r--sql/opt_range.cc4
-rw-r--r--sql/opt_subselect.cc3
-rw-r--r--sql/partition_info.cc3
-rw-r--r--sql/slave.cc3
-rw-r--r--sql/sp_head.cc4
-rw-r--r--sql/sql_base.cc8
-rw-r--r--sql/sql_insert.cc3
-rw-r--r--sql/sql_lex.cc3
-rw-r--r--sql/sql_parse.cc3
-rw-r--r--sql/sql_select.cc12
-rw-r--r--sql/sql_select.h2
-rw-r--r--sql/sql_statistics.cc2
-rw-r--r--sql/sql_time.cc3
-rw-r--r--sql/table.cc6
-rw-r--r--sql/tztime.cc4
27 files changed, 49 insertions, 103 deletions
diff --git a/sql/create_options.cc b/sql/create_options.cc
index 5800003ed49..86fb805315a 100644
--- a/sql/create_options.cc
+++ b/sql/create_options.cc
@@ -762,9 +762,8 @@ engine_option_value *merge_engine_table_options(engine_option_value *first,
engine_option_value *second,
MEM_ROOT *root)
{
- engine_option_value *end, *opt;
+ engine_option_value *UNINIT_VAR(end), *opt;
DBUG_ENTER("merge_engine_table_options");
- LINT_INIT(end);
/* Create copy of first list */
for (opt= first, first= 0; opt; opt= opt->next)
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index 5802d726aa2..2ace83ca751 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -1348,8 +1348,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
if (action->execute)
{
- const char *old_proc_info;
- LINT_INIT(old_proc_info);
+ const char *UNINIT_VAR(old_proc_info);
action->execute--;
diff --git a/sql/derror.cc b/sql/derror.cc
index f19f73238fb..7ac068300f9 100644
--- a/sql/derror.cc
+++ b/sql/derror.cc
@@ -152,13 +152,11 @@ bool read_texts(const char *file_name, const char *language,
File file;
char name[FN_REFLEN];
char lang_path[FN_REFLEN];
- uchar *buff;
+ uchar *UNINIT_VAR(buff);
uchar head[32],*pos;
DBUG_ENTER("read_texts");
*point= 0;
-
- LINT_INIT(buff);
funktpos=0;
convert_dirname(lang_path, language, NullS);
(void) my_load_path(lang_path, lang_path, lc_messages_dir);
diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc
index db4ae3ada46..53b3e96c323 100644
--- a/sql/event_db_repository.cc
+++ b/sql/event_db_repository.cc
@@ -414,9 +414,7 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table,
CHARSET_INFO *scs= system_charset_info;
KEY *key_info;
uint key_len;
- uchar *key_buf= NULL;
- LINT_INIT(key_buf);
-
+ uchar *key_buf;
DBUG_ENTER("Event_db_repository::index_read_for_db_for_i_s");
DBUG_PRINT("info", ("Using prefix scanning on PK"));
diff --git a/sql/handler.cc b/sql/handler.cc
index d64c14689bd..a68f5a7733c 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -5418,8 +5418,7 @@ int handler::index_read_idx_map(uchar * buf, uint index, const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
{
- int error, error1;
- LINT_INIT(error1);
+ int error, UNINIT_VAR(error1);
error= ha_index_init(index, 0);
if (!error)
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 7a5e13d3cb3..75916456ebd 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -470,8 +470,7 @@ static bool convert_const_to_int(THD *thd, Item_field *field_item,
my_bitmap_map *old_maps[2];
ulonglong UNINIT_VAR(orig_field_val); /* original field value if valid */
- LINT_INIT(old_maps[0]);
- LINT_INIT(old_maps[1]);
+ LINT_INIT_STRUCT(old_maps);
/* table->read_set may not be set if we come here from a CREATE TABLE */
if (table && table->read_set)
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 50e29aa4b7c..54fc8d555c8 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1948,8 +1948,7 @@ String *Item_func_ltrim::val_str(String *str)
char buff[MAX_FIELD_WIDTH], *ptr, *end;
String tmp(buff,sizeof(buff),system_charset_info);
String *res, *remove_str;
- uint remove_length;
- LINT_INIT(remove_length);
+ uint UNINIT_VAR(remove_length);
res= args[0]->val_str(str);
if ((null_value=args[0]->null_value))
@@ -1994,8 +1993,7 @@ String *Item_func_rtrim::val_str(String *str)
char buff[MAX_FIELD_WIDTH], *ptr, *end;
String tmp(buff, sizeof(buff), system_charset_info);
String *res, *remove_str;
- uint remove_length;
- LINT_INIT(remove_length);
+ uint UNINIT_VAR(remove_length);
res= args[0]->val_str(str);
if ((null_value=args[0]->null_value))
@@ -2075,8 +2073,7 @@ String *Item_func_trim::val_str(String *str)
const char *r_ptr;
String tmp(buff, sizeof(buff), system_charset_info);
String *res, *remove_str;
- uint remove_length;
- LINT_INIT(remove_length);
+ uint UNINIT_VAR(remove_length);
res= args[0]->val_str(str);
if ((null_value=args[0]->null_value))
diff --git a/sql/key.cc b/sql/key.cc
index e3787ea7869..aaecbda57ad 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -656,9 +656,8 @@ int key_tuple_cmp(KEY_PART_INFO *part, uchar *key1, uchar *key2,
uint tuple_length)
{
uchar *key1_end= key1 + tuple_length;
- int len;
+ int UNINIT_VAR(len);
int res;
- LINT_INIT(len);
for (;key1 < key1_end; key1 += len, key2 += len, part++)
{
len= part->store_length;
@@ -709,12 +708,9 @@ ulong key_hashnr(KEY *key_info, uint used_key_parts, const uchar *key)
for (; key_part < end_key_part; key_part++)
{
uchar *pos= (uchar*)key;
- CHARSET_INFO *cs;
- uint length, pack_length;
+ CHARSET_INFO *UNINIT_VAR(cs);
+ uint UNINIT_VAR(length), UNINIT_VAR(pack_length);
bool is_string= TRUE;
- LINT_INIT(cs);
- LINT_INIT(length);
- LINT_INIT(pack_length);
key+= key_part->length;
if (key_part->null_bit)
@@ -816,13 +812,9 @@ bool key_buf_cmp(KEY *key_info, uint used_key_parts,
{
uchar *pos1= (uchar*)key1;
uchar *pos2= (uchar*)key2;
- CHARSET_INFO *cs;
- uint length1, length2, pack_length;
+ CHARSET_INFO *UNINIT_VAR(cs);
+ uint UNINIT_VAR(length1), UNINIT_VAR(length2), UNINIT_VAR(pack_length);
bool is_string= TRUE;
- LINT_INIT(cs);
- LINT_INIT(length1);
- LINT_INIT(length2);
- LINT_INIT(pack_length);
key1+= key_part->length;
key2+= key_part->length;
diff --git a/sql/log.cc b/sql/log.cc
index 94536e49145..43eb8be3a59 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1502,8 +1502,7 @@ bool LOGGER::activate_log_handler(THD* thd, uint log_type)
void LOGGER::deactivate_log_handler(THD *thd, uint log_type)
{
my_bool *tmp_opt= 0;
- MYSQL_LOG *file_log;
- LINT_INIT(file_log);
+ MYSQL_LOG *UNINIT_VAR(file_log);
switch (log_type) {
case QUERY_LOG_SLOW:
@@ -4878,8 +4877,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
char new_name[FN_REFLEN], *new_name_ptr, *old_name, *file_to_open;
uint close_flag;
bool delay_close= false;
- File old_file;
- LINT_INIT(old_file);
+ File UNINIT_VAR(old_file);
DBUG_ENTER("MYSQL_BIN_LOG::new_file_impl");
if (!is_open())
@@ -5873,9 +5871,8 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
bool is_trans_cache= FALSE;
bool using_trans= event_info->use_trans_cache();
bool direct= event_info->use_direct_logging();
- ulong prev_binlog_id;
+ ulong UNINIT_VAR(prev_binlog_id);
DBUG_ENTER("MYSQL_BIN_LOG::write(Log_event *)");
- LINT_INIT(prev_binlog_id);
if (thd->variables.option_bits & OPTION_GTID_BEGIN)
{
@@ -7316,10 +7313,9 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
group_commit_entry *current, *last_in_queue;
group_commit_entry *queue= NULL;
bool check_purge= false;
- ulong binlog_id;
+ ulong UNINIT_VAR(binlog_id);
uint64 commit_id;
DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader");
- LINT_INIT(binlog_id);
{
DBUG_EXECUTE_IF("inject_binlog_commit_before_get_LOCK_log",
@@ -8297,8 +8293,7 @@ int TC_LOG_MMAP::log_and_order(THD *thd, my_xid xid, bool all,
{
int cookie;
struct commit_entry entry;
- bool is_group_commit_leader;
- LINT_INIT(is_group_commit_leader);
+ bool UNINIT_VAR(is_group_commit_leader);
if (need_prepare_ordered)
{
@@ -9794,8 +9789,7 @@ binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var,
{
ulong value= *((ulong *)save);
bool check_purge= false;
- ulong prev_binlog_id;
- LINT_INIT(prev_binlog_id);
+ ulong UNINIT_VAR(prev_binlog_id);
mysql_mutex_lock(mysql_bin_log.get_log_lock());
if(mysql_bin_log.is_open())
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 7b8bd30f04d..ad9d8f317e6 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -7063,8 +7063,7 @@ bool Intvar_log_event::write(IO_CACHE* file)
void Intvar_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
{
char llbuff[22];
- const char *msg;
- LINT_INIT(msg);
+ const char *UNINIT_VAR(msg);
Write_on_release_cache cache(&print_event_info->head_cache, file,
Write_on_release_cache::FLUSH_F);
@@ -11709,14 +11708,12 @@ record_compare_exit:
int Rows_log_event::find_key()
{
uint i, best_key_nr, last_part;
- KEY *key, *best_key;
- ulong best_rec_per_key, tmp;
+ KEY *key, *UNINIT_VAR(best_key);
+ ulong UNINIT_VAR(best_rec_per_key), tmp;
DBUG_ENTER("Rows_log_event::find_key");
DBUG_ASSERT(m_table);
best_key_nr= MAX_KEY;
- LINT_INIT(best_key);
- LINT_INIT(best_rec_per_key);
/*
Keys are sorted so that any primary key is first, followed by unique keys,
diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc
index 20b1c5d5cc1..61f344d8689 100644
--- a/sql/multi_range_read.cc
+++ b/sql/multi_range_read.cc
@@ -817,12 +817,11 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
THD *thd= current_thd;
int res;
Key_parameters keypar;
- uint key_buff_elem_size;
+ uint UNINIT_VAR(key_buff_elem_size); /* set/used when do_sort_keys==TRUE */
handler *h_idx;
Mrr_ordered_rndpos_reader *disk_strategy= NULL;
bool do_sort_keys= FALSE;
DBUG_ENTER("DsMrr_impl::dsmrr_init");
- LINT_INIT(key_buff_elem_size); /* set/used when do_sort_keys==TRUE */
/*
index_merge may invoke a scan on an object for which dsmrr_info[_const]
has not been called, so set the owner handler here as well.
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index aa85a023228..7b16646f0c9 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1540,8 +1540,7 @@ static void close_connections(void)
while (select_thread_in_use)
{
struct timespec abstime;
- int error;
- LINT_INIT(error);
+ int UNINIT_VAR(error);
DBUG_PRINT("info",("Waiting for select thread"));
#ifndef DONT_USE_THR_ALARM
@@ -7533,8 +7532,7 @@ static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope)
{
Master_info *mi= NULL;
- bool tmp;
- LINT_INIT(tmp);
+ bool UNINIT_VAR(tmp);
var->type= SHOW_MY_BOOL;
var->value= buff;
@@ -7561,8 +7559,7 @@ static int show_slave_received_heartbeats(THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope)
{
Master_info *mi= NULL;
- longlong tmp;
- LINT_INIT(tmp);
+ longlong UNINIT_VAR(tmp);
var->type= SHOW_LONGLONG;
var->value= buff;
@@ -7588,8 +7585,7 @@ static int show_heartbeat_period(THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope)
{
Master_info *mi= NULL;
- float tmp;
- LINT_INIT(tmp);
+ float UNINIT_VAR(tmp);
var->type= SHOW_CHAR;
var->value= buff;
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 8f691f4e5dc..4bef42e82bf 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3235,8 +3235,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
{
/* Try creating index_merge/ROR-union scan. */
SEL_IMERGE *imerge;
- TABLE_READ_PLAN *best_conj_trp= NULL, *new_conj_trp;
- LINT_INIT(new_conj_trp); /* no empty index_merge lists possible */
+ TABLE_READ_PLAN *best_conj_trp= NULL,
+ *UNINIT_VAR(new_conj_trp); /* no empty index_merge lists possible */
DBUG_PRINT("info",("No range reads possible,"
" trying to construct index_merge"));
List_iterator_fast<SEL_IMERGE> it(tree->merges);
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index e26937441d1..9804254b35f 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -3288,8 +3288,7 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
{
POSITION *pos= join->best_positions + tablenr;
JOIN_TAB *s= pos->table;
- uint first;
- LINT_INIT(first); // Set by every branch except SJ_OPT_NONE which doesn't use it
+ uint UNINIT_VAR(first); // Set by every branch except SJ_OPT_NONE which doesn't use it
if ((handled_tabs & s->table->map) || pos->sj_strategy == SJ_OPT_NONE)
{
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 34381b3cfb1..0d26563d45e 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -2047,8 +2047,7 @@ bool partition_info::set_up_charset_field_preps()
i= 0;
while ((field= *(ptr++)))
{
- uchar *field_buf;
- LINT_INIT(field_buf);
+ uchar *UNINIT_VAR(field_buf);
if (!field_is_partition_charset(field))
continue;
diff --git a/sql/slave.cc b/sql/slave.cc
index 2a852745470..af3288c5c8d 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3570,8 +3570,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
if (slave_trans_retries)
{
- int temp_err;
- LINT_INIT(temp_err);
+ int UNINIT_VAR(temp_err);
if (exec_res && (temp_err= has_temporary_error(thd)))
{
const char *errmsg;
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index e56462768b7..8efeeab01ec 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -1695,7 +1695,7 @@ bool
sp_head::execute_function(THD *thd, Item **argp, uint argcount,
Field *return_value_fld)
{
- ulonglong binlog_save_options;
+ ulonglong UNINIT_VAR(binlog_save_options);
bool need_binlog_call= FALSE;
uint arg_no;
sp_rcontext *octx = thd->spcont;
@@ -1709,8 +1709,6 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
DBUG_ENTER("sp_head::execute_function");
DBUG_PRINT("info", ("function %s", m_name.str));
- LINT_INIT(binlog_save_options);
-
/*
Check that the function is called with all specified arguments.
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 9ab72442dcd..b4c3e5ecafd 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -6071,17 +6071,14 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
List_iterator_fast<Natural_join_column>
field_it(*(table_ref->join_columns));
Natural_join_column *nj_col, *curr_nj_col;
- Field *found_field;
- Query_arena *arena, backup;
+ Field *UNINIT_VAR(found_field);
+ Query_arena *UNINIT_VAR(arena), backup;
DBUG_ENTER("find_field_in_natural_join");
DBUG_PRINT("enter", ("field name: '%s', ref 0x%lx",
name, (ulong) ref));
DBUG_ASSERT(table_ref->is_natural_join && table_ref->join_columns);
DBUG_ASSERT(*actual_table == NULL);
- LINT_INIT(arena);
- LINT_INIT(found_field);
-
for (nj_col= NULL, curr_nj_col= field_it++; curr_nj_col;
curr_nj_col= field_it++)
{
@@ -6101,7 +6098,6 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
if (nj_col->view_field)
{
Item *item;
- LINT_INIT(arena);
if (register_tree_change)
arena= thd->activate_stmt_arena_if_needed(&backup);
/*
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index b21f2a51a5b..24d75d97ee4 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -331,8 +331,7 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list,
table_map *map)
{
TABLE *table= insert_table_list->table;
- my_bool autoinc_mark;
- LINT_INIT(autoinc_mark);
+ my_bool UNINIT_VAR(autoinc_mark);
table->next_number_field_updated= FALSE;
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index f603534013f..4e061112128 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1028,7 +1028,7 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd)
static int lex_one_token(YYSTYPE *yylval, THD *thd)
{
- reg1 uchar c;
+ reg1 uchar UNINIT_VAR(c);
bool comment_closed;
int tokval, result_state;
uint length;
@@ -1039,7 +1039,6 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
const uchar *const state_map= cs->state_map;
const uchar *const ident_map= cs->ident_map;
- LINT_INIT(c);
lip->yylval=yylval; // The global state
lip->start_token();
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 30c4416b417..640eee093cc 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7310,11 +7310,10 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
LEX_STRING *option)
{
register TABLE_LIST *ptr;
- TABLE_LIST *previous_table_ref; /* The table preceding the current one. */
+ TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */
char *alias_str;
LEX *lex= thd->lex;
DBUG_ENTER("add_table_to_list");
- LINT_INIT(previous_table_ref);
if (!table)
DBUG_RETURN(0); // End of memory
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 28febc60fbb..15290b218ac 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -3397,7 +3397,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
DYNAMIC_ARRAY *keyuse_array)
{
int error= 0;
- TABLE *table;
+ TABLE *UNINIT_VAR(table); /* inited in all loops */
uint i,table_count,const_count,key;
table_map found_const_table_map, all_table_map, found_ref, refs;
key_map const_ref, eq_part;
@@ -3412,7 +3412,6 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
TABLE_LIST *tables;
DBUG_ENTER("make_join_statistics");
- LINT_INIT(table); /* inited in all loops */
table_count=join->table_count;
/*
@@ -12036,13 +12035,12 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
return change_list ? 0 : first_order; // No need to sort
ORDER *order,**prev_ptr, *tmp_order;
- table_map first_table;
+ table_map UNINIT_VAR(first_table); /* protected by first_is_base_table */
table_map not_const_tables= ~join->const_table_map;
table_map ref;
bool first_is_base_table= FALSE;
DBUG_ENTER("remove_const");
- LINT_INIT(first_table); /* protected by first_is_base_table */
if (join->join_tab[join->const_tables].table)
{
first_table= join->join_tab[join->const_tables].table->map;
@@ -15468,8 +15466,7 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
uint convert_blob_length)
{
bool maybe_null= item->maybe_null;
- Field *new_field;
- LINT_INIT(new_field);
+ Field *UNINIT_VAR(new_field);
switch (item->result_type()) {
case REAL_RESULT:
@@ -17462,9 +17459,8 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
{
int rc= 0;
enum_nested_loop_state error= NESTED_LOOP_OK;
- JOIN_TAB *join_tab;
+ JOIN_TAB *UNINIT_VAR(join_tab);
DBUG_ENTER("do_select");
- LINT_INIT(join_tab);
join->procedure=procedure;
join->tmp_table= table; /* Save for easy recursion */
diff --git a/sql/sql_select.h b/sql/sql_select.h
index fb42b6ba08e..dcfb6778ccc 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -762,7 +762,7 @@ public:
void set_empty()
{
sjm_scan_need_tables= 0;
- LINT_INIT(sjm_scan_last_inner);
+ LINT_INIT_STRUCT(sjm_scan_last_inner);
is_used= FALSE;
}
void set_from_prev(struct st_position *prev);
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 4ce1f3ec22a..021e4c37e86 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -1551,7 +1551,7 @@ public:
uint key_parts= table->actual_n_key_parts(key_info);
empty= TRUE;
prefixes= 0;
- LINT_INIT(calc_state);
+ LINT_INIT_STRUCT(calc_state);
is_single_comp_pk= FALSE;
uint pk= table->s->primary_key;
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index ca689d55a2b..267b183562b 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -545,8 +545,7 @@ bool parse_date_time_format(timestamp_type format_type,
{
if (*ptr == '%' && ptr+1 != end)
{
- uint position;
- LINT_INIT(position);
+ uint UNINIT_VAR(position);
switch (*++ptr) {
case 'y': // Year
case 'Y':
diff --git a/sql/table.cc b/sql/table.cc
index f8e9a424bf9..5c85d5668ed 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -4826,9 +4826,8 @@ bool TABLE_LIST::is_leaf_for_name_resolution()
TABLE_LIST *TABLE_LIST::first_leaf_for_name_resolution()
{
- TABLE_LIST *cur_table_ref;
+ TABLE_LIST *UNINIT_VAR(cur_table_ref);
NESTED_JOIN *cur_nested_join;
- LINT_INIT(cur_table_ref);
if (is_leaf_for_name_resolution())
return this;
@@ -5547,10 +5546,9 @@ Field_iterator_table_ref::get_or_create_column_ref(THD *thd, TABLE_LIST *parent_
{
Natural_join_column *nj_col;
bool is_created= TRUE;
- uint field_count;
+ uint UNINIT_VAR(field_count);
TABLE_LIST *add_table_ref= parent_table_ref ?
parent_table_ref : table_ref;
- LINT_INIT(field_count);
if (field_it == &table_field_it)
{
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 1cb1f5a0d5c..9fa065eefa0 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -327,7 +327,7 @@ static my_bool
prepare_tz_info(TIME_ZONE_INFO *sp, MEM_ROOT *storage)
{
my_time_t cur_t= MY_TIME_T_MIN;
- my_time_t cur_l, end_t, end_l;
+ my_time_t cur_l, end_t, UNINIT_VAR(end_l);
my_time_t cur_max_seen_l= MY_TIME_T_MIN;
long cur_offset, cur_corr, cur_off_and_corr;
uint next_trans_idx, next_leap_idx;
@@ -340,8 +340,6 @@ prepare_tz_info(TIME_ZONE_INFO *sp, MEM_ROOT *storage)
my_time_t revts[TZ_MAX_REV_RANGES];
REVT_INFO revtis[TZ_MAX_REV_RANGES];
- LINT_INIT(end_l);
-
/*
Let us setup fallback time type which will be used if we have not any
transitions or if we have moment of time before first transition.