From: Victor Julien Date: Thu, 6 Apr 2017 06:59:34 +0000 (+0200) Subject: geoip: fix compiler warning X-Git-Tag: suricata-4.0.0-beta1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5a0eb4b2cbfd5e93796e975be25e6304c7a14db;p=thirdparty%2Fsuricata.git geoip: fix compiler warning detect-geoip.c:78:40: error: incompatible pointer types assigning to 'int (*)(ThreadVars *, DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)' from 'int (ThreadVars *, DetectEngineThreadCtx *, Packet *, Signature *, const SigMatchCtx *)' [-Werror,-Wincompatible-pointer-types] sigmatch_table[DETECT_GEOIP].Match = DetectGeoipMatch; ^ ~~~~~~~~~~~~~~~~ 1 error generated. Bug #2045 --- diff --git a/src/detect-geoip.c b/src/detect-geoip.c index 0b1d29a3d2..1af990c1e4 100644 --- a/src/detect-geoip.c +++ b/src/detect-geoip.c @@ -63,7 +63,7 @@ void DetectGeoipRegister(void) static int DetectGeoipMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *, - Signature *, const SigMatchCtx *); + const Signature *, const SigMatchCtx *); static int DetectGeoipSetup(DetectEngineCtx *, Signature *, char *); static void DetectGeoipRegisterTests(void); static void DetectGeoipDataFree(void *); @@ -165,7 +165,7 @@ static int CheckGeoMatchIPv4(const DetectGeoipData *geoipdata, uint32_t ip) * \retval 1 match */ static int DetectGeoipMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, - Packet *p, Signature *s, const SigMatchCtx *ctx) + Packet *p, const Signature *s, const SigMatchCtx *ctx) { const DetectGeoipData *geoipdata = (const DetectGeoipData *)ctx; int matches = 0;