aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/aho-corasick/acism_create.c2
-rw-r--r--contrib/libucl/ucl_hash.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/contrib/aho-corasick/acism_create.c b/contrib/aho-corasick/acism_create.c
index 6b842cf3b..2d4439ffe 100644
--- a/contrib/aho-corasick/acism_create.c
+++ b/contrib/aho-corasick/acism_create.c
@@ -158,7 +158,7 @@ fill_symv(ACISM *psp, MEMREF const *strv, int nstrs)
#if ACISM_SIZE < 8
psp->sym_bits = bitwid(psp->nsyms);
- psp->sym_mask = ~(-1 << psp->sym_bits);
+ psp->sym_mask = ~((~0u) << psp->sym_bits);
#endif
}
diff --git a/contrib/libucl/ucl_hash.c b/contrib/libucl/ucl_hash.c
index a8e735d13..dbd19c928 100644
--- a/contrib/libucl/ucl_hash.c
+++ b/contrib/libucl/ucl_hash.c
@@ -66,7 +66,7 @@ extern const guchar lc_map[256];
static inline uint32_t
ucl_hash_func (const ucl_object_t *o)
{
- return rspamd_cryptobox_fast_hash (o->key, o->keylen, 0xb9a1ef83c4561c95ULL);
+ return (uint32_t)rspamd_cryptobox_fast_hash (o->key, o->keylen, 0xb9a1ef83c4561c95ULL);
}
static inline int
@@ -124,7 +124,7 @@ ucl_hash_caseless_func (const ucl_object_t *o)
break;
}
- return rspamd_cryptobox_fast_hash_final (&hst);
+ return (uint32_t)rspamd_cryptobox_fast_hash_final (&hst);
}