diff options
author | Ignacio Galarza <iggy@mysql.com> | 2009-02-10 17:47:54 -0500 |
---|---|---|
committer | Ignacio Galarza <iggy@mysql.com> | 2009-02-10 17:47:54 -0500 |
commit | 54fbbf9591e21cda9f7b26c2d795d88f51827f07 (patch) | |
tree | 6d7f0073845344099159d82b6dfe2e017670b700 /myisam | |
parent | 4568152518d075ec543bcc55b77241e4a5bf7c17 (diff) | |
download | mariadb-git-54fbbf9591e21cda9f7b26c2d795d88f51827f07.tar.gz |
Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 6 | ||||
-rw-r--r-- | myisam/mi_open.c | 5 | ||||
-rw-r--r-- | myisam/mi_packrec.c | 2 | ||||
-rw-r--r-- | myisam/mi_search.c | 2 | ||||
-rw-r--r-- | myisam/rt_index.c | 10 |
5 files changed, 13 insertions, 12 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 4f8883f377e..285a31d34c6 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -659,7 +659,7 @@ void mi_collect_stats_nonulls_first(HA_KEYSEG *keyseg, ulonglong *notnull, uchar *key) { uint first_null, kp; - first_null= ha_find_null(keyseg, key) - keyseg; + first_null= (uint) (ha_find_null(keyseg, key) - keyseg); /* All prefix tuples that don't include keypart_{first_null} are not-null tuples (and all others aren't), increment counters for them. @@ -715,7 +715,7 @@ int mi_collect_stats_nonulls_next(HA_KEYSEG *keyseg, ulonglong *notnull, seg= keyseg + diffs[0] - 1; /* Find first NULL in last_key */ - first_null_seg= ha_find_null(seg, last_key + diffs[1]) - keyseg; + first_null_seg= (uint) (ha_find_null(seg, last_key + diffs[1]) - keyseg); for (kp= 0; kp < first_null_seg; kp++) notnull[kp]++; @@ -3913,7 +3913,7 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a) key_block++; sort_info->key_block=key_block; sort_param->keyinfo=& sort_info->info->s->ft2_keyinfo; - ft_buf->count=(ft_buf->buf - p)/val_len; + ft_buf->count=(uint) (ft_buf->buf - p)/val_len; /* flushing buffer to second-level tree */ for (error=0; !error && p < ft_buf->buf; p+= val_len) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index 8e2f61a3b4b..d9b7f6453db 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -112,7 +112,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) share_buff.state.rec_per_key_part=rec_per_key_part; share_buff.state.key_root=key_root; share_buff.state.key_del=key_del; - share_buff.key_cache= multi_key_cache_search(name_buff, strlen(name_buff)); + share_buff.key_cache= multi_key_cache_search(name_buff, + (uint) strlen(name_buff)); DBUG_EXECUTE_IF("myisam_pretend_crashed_table_on_open", if (strstr(name, "/t1")) @@ -314,7 +315,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) (char*) key_del, (sizeof(my_off_t) * share->state.header.max_block_size)); strmov(share->unique_file_name, name_buff); - share->unique_name_length= strlen(name_buff); + share->unique_name_length= (uint) strlen(name_buff); strmov(share->index_file_name, index_name); strmov(share->data_file_name, data_name); diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index 63d624a1445..ddcf0f33e61 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -254,7 +254,7 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys) MYF(MY_HOLD_ON_ERROR)); /* Fix the table addresses in the tree heads. */ { - long diff=PTR_BYTE_DIFF(decode_table,share->decode_tables); + my_ptrdiff_t diff=PTR_BYTE_DIFF(decode_table,share->decode_tables); share->decode_tables=decode_table; for (i=0 ; i < trees ; i++) share->decode_trees[i].table=ADD_TO_PTR(share->decode_trees[i].table, diff --git a/myisam/mi_search.c b/myisam/mi_search.c index 530be5e042f..795c7ee55c3 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -408,7 +408,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, } from+=keyseg->length; page=from+nod_flag; - length=from-vseg; + length= (uint) (from - vseg); } if (page > end) diff --git a/myisam/rt_index.c b/myisam/rt_index.c index df8964edc20..494eccd38e4 100644 --- a/myisam/rt_index.c +++ b/myisam/rt_index.c @@ -95,7 +95,7 @@ static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag, _mi_kpos(nod_flag, k), level + 1))) { case 0: /* found - exit from recursion */ - *saved_key = k - page_buf; + *saved_key = (uint) (k - page_buf); goto ok; case 1: /* not found - continue searching */ info->rtree_recursion_depth = level; @@ -117,7 +117,7 @@ static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag, info->lastkey_length = k_len + info->s->base.rec_reflength; memcpy(info->lastkey, k, info->lastkey_length); info->rtree_recursion_depth = level; - *saved_key = last - page_buf; + *saved_key = (uint) (last - page_buf); if (after_key < last) { @@ -314,7 +314,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length, _mi_kpos(nod_flag, k), level + 1))) { case 0: /* found - exit from recursion */ - *saved_key = k - page_buf; + *saved_key = (uint) (k - page_buf); goto ok; case 1: /* not found - continue searching */ info->rtree_recursion_depth = level; @@ -333,7 +333,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length, memcpy(info->lastkey, k, info->lastkey_length); info->rtree_recursion_depth = level; - *saved_key = k - page_buf; + *saved_key = (uint) (k - page_buf); if (after_key < last) { @@ -420,7 +420,7 @@ int rtree_get_next(MI_INFO *info, uint keynr, uint key_length) info->lastkey_length = k_len + info->s->base.rec_reflength; memcpy(info->lastkey, key, k_len + info->s->base.rec_reflength); - *(int*)info->int_keypos = key - info->buff; + *(uint*)info->int_keypos = (uint) (key - info->buff); if (after_key >= info->int_maxpos) { info->buff_used = 1; |