BUILD: pattern: fix build warnings introduced in the LRU cache
They're caused by the cast to long long from ptr in 32-bit.
src/pattern.c: In function 'pat_match_str':
src/pattern.c:479:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
diff --git a/src/pattern.c b/src/pattern.c
index cbfa20d..656c190 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -476,7 +476,7 @@
/* look in the list */
if (pat_lru_tree) {
- unsigned long long seed = pat_lru_seed ^ (unsigned long long)expr;
+ unsigned long long seed = pat_lru_seed ^ (long)expr;
lru = lru64_get(XXH64(smp->data.str.str, smp->data.str.len, seed),
pat_lru_tree, expr, expr->revision);
@@ -513,7 +513,7 @@
struct lru64 *lru = NULL;
if (pat_lru_tree) {
- unsigned long long seed = pat_lru_seed ^ (unsigned long long)expr;
+ unsigned long long seed = pat_lru_seed ^ (long)expr;
lru = lru64_get(XXH64(smp->data.str.str, smp->data.str.len, seed),
pat_lru_tree, expr, expr->revision);
@@ -550,7 +550,7 @@
struct lru64 *lru = NULL;
if (pat_lru_tree) {
- unsigned long long seed = pat_lru_seed ^ (unsigned long long)expr;
+ unsigned long long seed = pat_lru_seed ^ (long)expr;
lru = lru64_get(XXH64(smp->data.str.str, smp->data.str.len, seed),
pat_lru_tree, expr, expr->revision);
@@ -610,7 +610,7 @@
/* look in the list */
if (pat_lru_tree) {
- unsigned long long seed = pat_lru_seed ^ (unsigned long long)expr;
+ unsigned long long seed = pat_lru_seed ^ (long)expr;
lru = lru64_get(XXH64(smp->data.str.str, smp->data.str.len, seed),
pat_lru_tree, expr, expr->revision);
@@ -649,7 +649,7 @@
struct lru64 *lru = NULL;
if (pat_lru_tree) {
- unsigned long long seed = pat_lru_seed ^ (unsigned long long)expr;
+ unsigned long long seed = pat_lru_seed ^ (long)expr;
lru = lru64_get(XXH64(smp->data.str.str, smp->data.str.len, seed),
pat_lru_tree, expr, expr->revision);
@@ -692,7 +692,7 @@
struct lru64 *lru = NULL;
if (pat_lru_tree) {
- unsigned long long seed = pat_lru_seed ^ (unsigned long long)expr;
+ unsigned long long seed = pat_lru_seed ^ (long)expr;
lru = lru64_get(XXH64(smp->data.str.str, smp->data.str.len, seed),
pat_lru_tree, expr, expr->revision);