summaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-03-27 10:59:31 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-03-27 11:00:28 -0400
commit79e809d94505708b224bb4a63a1a92b2e7abba4d (patch)
tree4aed32fe306dc8d9c1e82e3dd18cd3f5fbd9badc /src/benchmarks
parent0f29560aa2214f1fb28a601212242c58524f85a3 (diff)
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
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eina/ecore_hash.c12
-rw-r--r--src/benchmarks/eina/ecore_sheap.c7
2 files changed, 10 insertions, 9 deletions
diff --git a/src/benchmarks/eina/ecore_hash.c b/src/benchmarks/eina/ecore_hash.c
index 4d40588..374a0e0 100644
--- a/src/benchmarks/eina/ecore_hash.c
+++ b/src/benchmarks/eina/ecore_hash.c
@@ -460,7 +460,7 @@ _ecore_hash_bucket_destroy(Ecore_Hash_Node *list,
460static int 460static int
461_ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node) 461_ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node)
462{ 462{
463 unsigned long hash_val; 463 size_t hash_val;
464 464
465 CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE); 465 CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
466 CHECK_PARAM_POINTER_RETURN("node", node, FALSE); 466 CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
@@ -471,7 +471,7 @@ _ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node)
471 471
472 /* Compute the position in the table */ 472 /* Compute the position in the table */
473 if (!hash->hash_func) 473 if (!hash->hash_func)
474 hash_val = (unsigned long)node->key % ecore_prime_table[hash->size]; 474 hash_val = (size_t)node->key % ecore_prime_table[hash->size];
475 else 475 else
476 hash_val = ECORE_COMPUTE_HASH(hash, node->key); 476 hash_val = ECORE_COMPUTE_HASH(hash, node->key);
477 477
@@ -522,14 +522,14 @@ ecore_hash_remove(Ecore_Hash *hash, const void *key)
522{ 522{
523 Ecore_Hash_Node *node = NULL; 523 Ecore_Hash_Node *node = NULL;
524 Ecore_Hash_Node *list; 524 Ecore_Hash_Node *list;
525 unsigned long hash_val; 525 size_t hash_val;
526 void *ret = NULL; 526 void *ret = NULL;
527 527
528 CHECK_PARAM_POINTER_RETURN("hash", hash, NULL); 528 CHECK_PARAM_POINTER_RETURN("hash", hash, NULL);
529 529
530 /* Compute the position in the table */ 530 /* Compute the position in the table */
531 if (!hash->hash_func) 531 if (!hash->hash_func)
532 hash_val = (unsigned long )key % ecore_prime_table[hash->size]; 532 hash_val = (size_t)key % ecore_prime_table[hash->size];
533 else 533 else
534 hash_val = ECORE_COMPUTE_HASH(hash, key); 534 hash_val = ECORE_COMPUTE_HASH(hash, key);
535 535
@@ -626,7 +626,7 @@ ecore_hash_find(Ecore_Hash *hash, Ecore_Compare_Cb compare, const void *value)
626static Ecore_Hash_Node * 626static Ecore_Hash_Node *
627_ecore_hash_node_get(Ecore_Hash *hash, const void *key) 627_ecore_hash_node_get(Ecore_Hash *hash, const void *key)
628{ 628{
629 unsigned long hash_val; 629 size_t hash_val;
630 Ecore_Hash_Node *node = NULL; 630 Ecore_Hash_Node *node = NULL;
631 631
632 CHECK_PARAM_POINTER_RETURN("hash", hash, NULL); 632 CHECK_PARAM_POINTER_RETURN("hash", hash, NULL);
@@ -636,7 +636,7 @@ _ecore_hash_node_get(Ecore_Hash *hash, const void *key)
636 636
637 /* Compute the position in the table */ 637 /* Compute the position in the table */
638 if (!hash->hash_func) 638 if (!hash->hash_func)
639 hash_val = (unsigned long)key % ecore_prime_table[hash->size]; 639 hash_val = (size_t)key % ecore_prime_table[hash->size];
640 else 640 else
641 hash_val = ECORE_COMPUTE_HASH(hash, key); 641 hash_val = ECORE_COMPUTE_HASH(hash, key);
642 642
diff --git a/src/benchmarks/eina/ecore_sheap.c b/src/benchmarks/eina/ecore_sheap.c
index 448be97..e86c10b 100644
--- a/src/benchmarks/eina/ecore_sheap.c
+++ b/src/benchmarks/eina/ecore_sheap.c
@@ -4,6 +4,7 @@
4 4
5#include <stdlib.h> 5#include <stdlib.h>
6#include <string.h> 6#include <string.h>
7#include <stdint.h>
7 8
8#include "Ecore_Data.h" 9#include "Ecore_Data.h"
9 10
@@ -452,10 +453,10 @@ _ecore_sheap_update_data(Ecore_Sheap *heap)
452int 453int
453ecore_direct_compare(const void *key1, const void *key2) 454ecore_direct_compare(const void *key1, const void *key2)
454{ 455{
455 unsigned long k1, k2; 456 uintptr_t k1, k2;
456 457
457 k1 = (unsigned long)key1; 458 k1 = (uintptr_t)key1;
458 k2 = (unsigned long)key2; 459 k2 = (uintptr_t)key2;
459 460
460 if (k1 > k2) 461 if (k1 > k2)
461 return 1; 462 return 1;