From: Victor Julien Date: Fri, 21 Jul 2023 08:32:07 +0000 (+0200) Subject: detect: fix minor compile warning X-Git-Tag: suricata-7.0.1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73b0efb03ae362e10861874c0f2f3d7e3f2240cd;p=thirdparty%2Fsuricata.git detect: fix minor compile warning detect-engine.c: In function ‘DetectKeywordCtxHashFunc’: detect-engine.c:3550:75: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 3550 | uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (uint64_t)ctx->data; | --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 141b48a902..4ec6d9a284 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -3547,7 +3547,7 @@ static uint32_t DetectKeywordCtxHashFunc(HashListTable *ht, void *data, uint16_t { DetectEngineThreadKeywordCtxItem *ctx = data; const char *name = ctx->name; - uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (uint64_t)ctx->data; + uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (ptrdiff_t)ctx->data; hash %= ht->array_size; return hash; }