From: Ron Dempster (rdempste) Date: Mon, 2 May 2022 18:06:56 +0000 (+0000) Subject: Pull request #3406: flow, side_channel, utils: fix clang issues X-Git-Tag: 3.1.29.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56491f9fd501d9e85d097979e3bb61fee8b04667;p=thirdparty%2Fsnort3.git Pull request #3406: flow, side_channel, utils: fix clang issues Merge in SNORT/snort3 from ~RDEMPSTE/snort3:fix_issues to master Squashed commit of the following: commit ed8b5e927b8e6aafb9b58b85f596a49c647054b0 Author: Ron Dempster (rdempste) Date: Mon May 2 10:12:21 2022 -0400 flow, side_channel, utils: fix clang issues --- diff --git a/src/flow/test/ha_test.cc b/src/flow/test/ha_test.cc index 49775341e..4309056b7 100644 --- a/src/flow/test/ha_test.cc +++ b/src/flow/test/ha_test.cc @@ -50,7 +50,8 @@ static const FlowKey s_test_key = /* .ip_protocol = */ 14, /* .pkt_type = */ PktType::TCP, /* .version = */ 14, - /* .flags = */ 0, + /* .flags.group_used = */ 0, + /* .flags.padding_bits = */ 0, }; static struct __attribute__((__packed__)) TestDeleteMessage { diff --git a/src/side_channel/side_channel.cc b/src/side_channel/side_channel.cc index e03da5ff0..ff8c7b19f 100644 --- a/src/side_channel/side_channel.cc +++ b/src/side_channel/side_channel.cc @@ -245,7 +245,7 @@ SCMessage* SideChannel::alloc_transmit_message(uint32_t content_length) { SCMessage* msg = new SCMessage; msg->handle = connector_transmit->alloc_message((content_length + sizeof(SCMsgHdr)), - (const uint8_t**)&(msg->hdr)); + const_cast(reinterpret_cast(&msg->hdr))); assert(msg->handle); msg->sc = this; diff --git a/src/utils/util_jsnorm.cc b/src/utils/util_jsnorm.cc index 5a4963231..fdf5ae78c 100644 --- a/src/utils/util_jsnorm.cc +++ b/src/utils/util_jsnorm.cc @@ -832,7 +832,7 @@ static void StringFromCharCodeDecode( { js->alerts |= ALERT_MIXED_ENCODINGS; } - UnescapeDecode(s.output.data, s.output.len, (const char**)&(s.output.data), &s.output.data, + UnescapeDecode(s.output.data, s.output.len, const_cast(&s.output.data), &s.output.data, s.output.size, &(s.output.len), js, iis_unicode_map); *bytes_copied = s.output.len;