From: Philippe Antoine Date: Mon, 2 May 2022 11:30:35 +0000 (+0200) Subject: decode: fix integer warning X-Git-Tag: suricata-7.0.0-beta1~525 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7455%2Fhead;p=thirdparty%2Fsuricata.git decode: fix integer warning Newly introduced warning. Regular cast as value is checked just before. Ticket: #4516 --- diff --git a/src/decode.c b/src/decode.c index c29d2827dd..c87941ff80 100644 --- a/src/decode.c +++ b/src/decode.c @@ -814,7 +814,7 @@ void PacketAlertGetMaxConfig(void) SCLogWarning(SC_ERR_INVALID_VALUE, "Invalid value for packet-alert-max, default value set instead"); } else { - packet_alert_max = max; + packet_alert_max = (uint16_t)max; } } SCLogDebug("detect->packet_alert_max set to %d", packet_alert_max);