summaryrefslogtreecommitdiff
path: root/mysys/hash.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-19 17:45:17 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commiteba44874ca9fc317696630cb371623142289fa99 (patch)
treef67cd5dbcaf102abef2fb26f76357d14feaded04 /mysys/hash.c
parentde7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff)
downloadmariadb-git-eba44874ca9fc317696630cb371623142289fa99.tar.gz
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
Diffstat (limited to 'mysys/hash.c')
-rw-r--r--mysys/hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mysys/hash.c b/mysys/hash.c
index ad01afba29e..57242735d99 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -84,7 +84,7 @@ my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
{
my_bool res;
DBUG_ENTER("my_hash_init");
- DBUG_PRINT("enter",("hash: 0x%lx size: %u", (long) hash, (uint) size));
+ DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0;
hash->key_offset=key_offset;
@@ -144,8 +144,8 @@ static inline void my_hash_free_elements(HASH *hash)
void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
- DBUG_PRINT("enter",("hash: 0x%lx elements: %ld",
- (long) hash, hash->records));
+ DBUG_PRINT("enter",("hash:%p elements: %ld",
+ hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
@@ -166,7 +166,7 @@ void my_hash_free(HASH *hash)
void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
- DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
+ DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
@@ -844,8 +844,8 @@ my_bool my_hash_check(HASH *hash)
blength, records)) != i)
{
DBUG_PRINT("error", ("Record in wrong link at %d: Start %d "
- "Record: 0x%lx Record-link %d",
- idx, i, (long) hash_info->data, rec_link));
+ "Record:%p Record-link %d",
+ idx, i, hash_info->data, rec_link));
error=1;
}
else