eina benchmark: fix warnings on Windows 64 bits

Summary: long is always a 32 bits type on Windows

Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8482
This commit is contained in:
Vincent Torri 2019-03-27 10:59:31 -04:00 committed by Mike Blumenkrantz
parent 0f29560aa2
commit 79e809d945
2 changed files with 10 additions and 9 deletions

View File

@ -460,7 +460,7 @@ _ecore_hash_bucket_destroy(Ecore_Hash_Node *list,
static int
_ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node)
{
unsigned long hash_val;
size_t hash_val;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
@ -471,7 +471,7 @@ _ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node)
/* Compute the position in the table */
if (!hash->hash_func)
hash_val = (unsigned long)node->key % ecore_prime_table[hash->size];
hash_val = (size_t)node->key % ecore_prime_table[hash->size];
else
hash_val = ECORE_COMPUTE_HASH(hash, node->key);
@ -522,14 +522,14 @@ ecore_hash_remove(Ecore_Hash *hash, const void *key)
{
Ecore_Hash_Node *node = NULL;
Ecore_Hash_Node *list;
unsigned long hash_val;
size_t hash_val;
void *ret = NULL;
CHECK_PARAM_POINTER_RETURN("hash", hash, NULL);
/* Compute the position in the table */
if (!hash->hash_func)
hash_val = (unsigned long )key % ecore_prime_table[hash->size];
hash_val = (size_t)key % ecore_prime_table[hash->size];
else
hash_val = ECORE_COMPUTE_HASH(hash, key);
@ -626,7 +626,7 @@ ecore_hash_find(Ecore_Hash *hash, Ecore_Compare_Cb compare, const void *value)
static Ecore_Hash_Node *
_ecore_hash_node_get(Ecore_Hash *hash, const void *key)
{
unsigned long hash_val;
size_t hash_val;
Ecore_Hash_Node *node = NULL;
CHECK_PARAM_POINTER_RETURN("hash", hash, NULL);
@ -636,7 +636,7 @@ _ecore_hash_node_get(Ecore_Hash *hash, const void *key)
/* Compute the position in the table */
if (!hash->hash_func)
hash_val = (unsigned long)key % ecore_prime_table[hash->size];
hash_val = (size_t)key % ecore_prime_table[hash->size];
else
hash_val = ECORE_COMPUTE_HASH(hash, key);

View File

@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "Ecore_Data.h"
@ -452,10 +453,10 @@ _ecore_sheap_update_data(Ecore_Sheap *heap)
int
ecore_direct_compare(const void *key1, const void *key2)
{
unsigned long k1, k2;
uintptr_t k1, k2;
k1 = (unsigned long)key1;
k2 = (unsigned long)key2;
k1 = (uintptr_t)key1;
k2 = (uintptr_t)key2;
if (k1 > k2)
return 1;