summaryrefslogtreecommitdiff
path: root/mysys/mf_keycache.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
commit6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch)
tree3603f88e1b3bd1e622edb182cccd882dd31ddc8a /mysys/mf_keycache.c
parentf271100836d8a91a775894ec36b869a66a3145e5 (diff)
downloadmariadb-git-6c279ad6a71c63cb595fde7c951aadb31c3dbebc.tar.gz
MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
Diffstat (limited to 'mysys/mf_keycache.c')
-rw-r--r--mysys/mf_keycache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 2f0f2bf05c0..edf8cd3be8a 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -2429,7 +2429,7 @@ restart:
The call is thread safe because only the current
thread might change the block->hash_link value
*/
- error= my_pwrite(block->hash_link->file,
+ error= (int)my_pwrite(block->hash_link->file,
block->buffer + block->offset,
block->length - block->offset,
block->hash_link->diskpos + block->offset,
@@ -2674,7 +2674,7 @@ static void read_block_primary(SIMPLE_KEY_CACHE_CB *keycache,
else
{
block->status|= BLOCK_READ;
- block->length= got_length;
+ block->length= (uint)got_length;
/*
Do not set block->offset here. If this block is marked
BLOCK_CHANGED later, we want to flush only the modified part. So
@@ -3809,7 +3809,7 @@ static int flush_cached_blocks(SIMPLE_KEY_CACHE_CB *keycache,
(BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE));
block->status|= BLOCK_IN_FLUSHWRITE;
keycache_pthread_mutex_unlock(&keycache->cache_lock);
- error= my_pwrite(file, block->buffer + block->offset,
+ error= (int)my_pwrite(file, block->buffer + block->offset,
block->length - block->offset,
block->hash_link->diskpos + block->offset,
MYF(MY_NABP | MY_WAIT_IF_FULL));