summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-02-10 14:05:49 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-03-16 14:48:22 +0400
commit18e9c314e43271debf58f3c3e5bf454eab655799 (patch)
treecd2ff9ea71622f048b609873f4024eabfa965d3d /storage/myisam
parent10554ca6cbb6a02098b0cc1a55fb5426164ef348 (diff)
downloadmariadb-git-18e9c314e43271debf58f3c3e5bf454eab655799.tar.gz
MDEV-6650 - LINT_INIT emits code in non-debug builds
Replaced all references to LINT_INIT with UNINIT_VAR and LINT_INIT_STRUCT. Removed LINT_INIT macro.
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_check.c1
-rw-r--r--storage/myisam/mi_delete.c1
-rw-r--r--storage/myisam/mi_open.c1
-rw-r--r--storage/myisam/mi_packrec.c1
-rw-r--r--storage/myisam/mi_search.c3
-rw-r--r--storage/myisam/mi_write.c7
-rw-r--r--storage/myisam/rt_index.c7
-rw-r--r--storage/myisam/sort.c9
8 files changed, 7 insertions, 23 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index b79d6c891f1..be0b90b4bad 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -3292,7 +3292,6 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
}
}
case DYNAMIC_RECORD:
- LINT_INIT(to);
pos=sort_param->pos;
searching=(sort_param->fix_datafile && (param->testflag & T_EXTEND));
parallel_flag= (sort_param->read_cache.file < 0) ? READING_NEXT : 0;
diff --git a/storage/myisam/mi_delete.c b/storage/myisam/mi_delete.c
index 3fffa55341b..6a023f35b88 100644
--- a/storage/myisam/mi_delete.c
+++ b/storage/myisam/mi_delete.c
@@ -305,7 +305,6 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
}
}
leaf_buff=0;
- LINT_INIT(leaf_page);
if (nod_flag)
{
leaf_page=_mi_kpos(nod_flag,keypos);
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index 060017f10ad..b8cbefe6ac2 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -721,7 +721,6 @@ uchar *mi_alloc_rec_buff(MI_INFO *info, ulong length, uchar **buf)
{
uint extra;
uint32 UNINIT_VAR(old_length);
- LINT_INIT(old_length);
if (! *buf || length > (old_length=mi_get_rec_buff_len(info, *buf)))
{
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c
index d1ad911d334..3687cfc2179 100644
--- a/storage/myisam/mi_packrec.c
+++ b/storage/myisam/mi_packrec.c
@@ -1364,7 +1364,6 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff,
{
uchar *header=info->header;
uint head_length, UNINIT_VAR(ref_length);
- LINT_INIT(ref_length);
if (file >= 0)
{
diff --git a/storage/myisam/mi_search.c b/storage/myisam/mi_search.c
index 3ce112f7906..60a34c641ad 100644
--- a/storage/myisam/mi_search.c
+++ b/storage/myisam/mi_search.c
@@ -187,11 +187,10 @@ int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *buff __attribute__((unused)), my_bool *last_key)
{
reg4 int start,mid,end,save_end;
- int flag;
+ int UNINIT_VAR(flag);
uint totlength,nod_flag,not_used[2];
DBUG_ENTER("_mi_bin_search");
- LINT_INIT(flag);
totlength=keyinfo->keylength+(nod_flag=mi_test_if_nod(page));
start=0; mid=1;
save_end=end=(int) ((mi_getint(page)-2-nod_flag)/totlength-1);
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 2b922bbaa9e..ff96ee8751b 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -595,11 +595,10 @@ int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_bool insert_last_key)
{
uint length,a_length,key_ref_length,t_length,nod_flag,key_length;
- uchar *key_pos,*pos, *after_key;
+ uchar *key_pos,*pos, *UNINIT_VAR(after_key);
my_off_t new_pos;
MI_KEY_PARAM s_temp;
DBUG_ENTER("mi_split_page");
- LINT_INIT(after_key);
DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff));
if (info->s->keyinfo+info->lastinx == keyinfo)
@@ -710,13 +709,11 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
- uint keys,length,last_length,key_ref_length;
+ uint keys, length, UNINIT_VAR(last_length), key_ref_length;
uchar *end,*lastpos,*prevpos;
uchar key_buff[HA_MAX_KEY_BUFF];
DBUG_ENTER("_mi_find_last_pos");
- LINT_INIT(last_length);
-
key_ref_length=2;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
diff --git a/storage/myisam/rt_index.c b/storage/myisam/rt_index.c
index fc0c0345f5e..b3b7fd0e37f 100644
--- a/storage/myisam/rt_index.c
+++ b/storage/myisam/rt_index.c
@@ -469,14 +469,11 @@ static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
double increase;
double best_incr = DBL_MAX;
double perimeter;
- double best_perimeter;
- uchar *best_key;
+ double UNINIT_VAR(best_perimeter);
+ uchar *UNINIT_VAR(best_key);
uchar *k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
uchar *last = rt_PAGE_END(page_buf);
- LINT_INIT(best_perimeter);
- LINT_INIT(best_key);
-
for (; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag))
{
if ((increase = rtree_perimeter_increase(keyinfo->seg, k, key, key_length,
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index 8e45ca1a3ea..f65d1e8fe58 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -107,7 +107,7 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
uint sort_length, maxbuffer;
ulonglong memavl, old_memavl;
DYNAMIC_ARRAY buffpek;
- ha_rows records, keys;
+ ha_rows records, UNINIT_VAR(keys);
uchar **sort_keys;
IO_CACHE tempfile, tempfile_for_exceptions;
DBUG_ENTER("_create_index_by_sort");
@@ -135,7 +135,6 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
memavl= MY_MAX(sortbuff_size, MIN_SORT_BUFFER);
records= info->sort_info->max_records;
sort_length= info->key_length;
- LINT_INIT(keys);
while (memavl >= MIN_SORT_BUFFER)
{
@@ -342,13 +341,11 @@ pthread_handler_t thr_find_all_keys(void *arg)
MI_SORT_PARAM *sort_param= (MI_SORT_PARAM*) arg;
int error;
ulonglong memavl, old_memavl, sortbuff_size;
- ha_keys keys, idx;
+ ha_keys UNINIT_VAR(keys), idx;
uint sort_length;
uint maxbuffer;
uchar **sort_keys=0;
- LINT_INIT(keys);
-
error=1;
if (my_thread_init())
@@ -552,7 +549,6 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
MI_SORT_PARAM *sinfo;
uchar *mergebuf=0;
DBUG_ENTER("thr_write_keys");
- LINT_INIT(length);
for (i= 0, sinfo= sort_param ;
i < sort_info->total_keys ;
@@ -977,7 +973,6 @@ merge_buffers(MI_SORT_PARAM *info, ha_keys keys, IO_CACHE *from_file,
count=error=0;
maxcount= keys/((uint) (Tb-Fb) +1);
DBUG_ASSERT(maxcount > 0);
- LINT_INIT(to_start_filepos);
if (to_file)
to_start_filepos=my_b_tell(to_file);
strpos=(uchar*) sort_keys;