diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 14:56:16 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 14:56:16 +0000 |
commit | 6b2b4167187fee09365271cca182866ecb029af3 (patch) | |
tree | a085717bc896b25ff4280eb86abecca0d5c36767 /test | |
parent | 47bcfc8360dfa1754474580e779314b8d6a78da6 (diff) | |
download | rspamd-6b2b4167187fee09365271cca182866ecb029af3.tar.gz rspamd-6b2b4167187fee09365271cca182866ecb029af3.zip |
[Rework] Remove some of the GLib types in lieu of standard ones
This types have constant conflicts with the system ones especially on OSX.
Diffstat (limited to 'test')
-rw-r--r-- | test/rspamd_cryptobox_test.c | 4 | ||||
-rw-r--r-- | test/rspamd_radix_test.c | 8 | ||||
-rw-r--r-- | test/rspamd_shingles_test.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/test/rspamd_cryptobox_test.c b/test/rspamd_cryptobox_test.c index e3d85048d..e6c68fb6a 100644 --- a/test/rspamd_cryptobox_test.c +++ b/test/rspamd_cryptobox_test.c @@ -49,12 +49,12 @@ static void check_result(const rspamd_nm_t key, const rspamd_nonce_t nonce, const rspamd_mac_t mac, guchar *begin, guchar *end) { - guint64 *t = (guint64 *) begin; + uint64_t *t = (uint64_t *) begin; g_assert(rspamd_cryptobox_decrypt_nm_inplace(begin, end - begin, nonce, key, mac, mode)); - while (t < (guint64 *) end) { + while (t < (uint64_t *) end) { g_assert(*t == 0); t++; } diff --git a/test/rspamd_radix_test.c b/test/rspamd_radix_test.c index 8d31dc169..466f355cf 100644 --- a/test/rspamd_radix_test.c +++ b/test/rspamd_radix_test.c @@ -38,7 +38,7 @@ struct _tv { const char *ip; const char *nip; const char *m; - guint32 mask; + uint32_t mask; guint8 *addr; guint8 *naddr; gsize len; @@ -207,10 +207,10 @@ void rspamd_radix_test_func(void) struct btrie *btrie; rspamd_mempool_t *pool; struct { - guint32 addr; - guint32 mask; + uint32_t addr; + uint32_t mask; guint8 addr6[16]; - guint32 mask6; + uint32_t mask6; guint8 addr64[16]; } *addrs; gsize nelts, i, check; diff --git a/test/rspamd_shingles_test.c b/test/rspamd_shingles_test.c index 307634e30..4c1c6472f 100644 --- a/test/rspamd_shingles_test.c +++ b/test/rspamd_shingles_test.c @@ -136,7 +136,7 @@ test_case(gsize cnt, gsize max_len, gdouble perm_factor, g_free(sgl_permuted); } -static const guint64 expected_old[RSPAMD_SHINGLE_SIZE] = { +static const uint64_t expected_old[RSPAMD_SHINGLE_SIZE] = { 0x2a97e024235cedc5, 0x46238acbcc55e9e0, 0x2378ff151af075b3, @@ -171,7 +171,7 @@ static const guint64 expected_old[RSPAMD_SHINGLE_SIZE] = { 0x99fbca9f8563080, }; -static const guint64 expected_xxhash[RSPAMD_SHINGLE_SIZE] = { +static const uint64_t expected_xxhash[RSPAMD_SHINGLE_SIZE] = { 0x33b134be11a705a, 0x36e2ea657aa36903, 0x6547b57f7470ce9d, @@ -206,7 +206,7 @@ static const guint64 expected_xxhash[RSPAMD_SHINGLE_SIZE] = { 0x68454ef43da9c748, }; -static const guint64 expected_mumhash[RSPAMD_SHINGLE_SIZE] = { +static const uint64_t expected_mumhash[RSPAMD_SHINGLE_SIZE] = { 0x38d35473b80a7fc3, 0x1300531adc2d16a1, 0x26883bc89f78f4bd, @@ -241,7 +241,7 @@ static const guint64 expected_mumhash[RSPAMD_SHINGLE_SIZE] = { 0x33cb9190905e049a, }; -static const guint64 expected_fasthash[RSPAMD_SHINGLE_SIZE] = { +static const uint64_t expected_fasthash[RSPAMD_SHINGLE_SIZE] = { 0x3843a716f94828a6, 0x13fd5386dda3b28d, 0x71cb09de527c40a, |