summaryrefslogtreecommitdiff
path: root/sql/key.cc
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 /sql/key.cc
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 'sql/key.cc')
-rw-r--r--sql/key.cc18
1 files changed, 5 insertions, 13 deletions
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;