]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3406: flow, side_channel, utils: fix clang issues
authorRon Dempster (rdempste) <rdempste@cisco.com>
Mon, 2 May 2022 18:06:56 +0000 (18:06 +0000)
committerRon Dempster (rdempste) <rdempste@cisco.com>
Mon, 2 May 2022 18:06:56 +0000 (18:06 +0000)
Merge in SNORT/snort3 from ~RDEMPSTE/snort3:fix_issues to master

Squashed commit of the following:

commit ed8b5e927b8e6aafb9b58b85f596a49c647054b0
Author: Ron Dempster (rdempste) <rdempste@cisco.com>
Date:   Mon May 2 10:12:21 2022 -0400

    flow, side_channel, utils: fix clang issues

src/flow/test/ha_test.cc
src/side_channel/side_channel.cc
src/utils/util_jsnorm.cc

index 49775341ea63f34343568e5d0e6353989f16b07f..4309056b72bf5800fff0c7b200eea764f79cfe1a 100644 (file)
@@ -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 {
index e03da5ff08bdc3b34dab2e89b1ac23728339f90a..ff8c7b19f14ac0994e56c9566d5e17d3c26cf69c 100644 (file)
@@ -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<const uint8_t**>(reinterpret_cast<uint8_t**>(&msg->hdr)));
     assert(msg->handle);
 
     msg->sc = this;
index 5a4963231c4debbb777f6e59ee7ae5c32c28628e..fdf5ae78c9b0358ad8165a6ab9c4ba0718bc307c 100644 (file)
@@ -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<const char**>(&s.output.data), &s.output.data,
         s.output.size, &(s.output.len), js, iis_unicode_map);
 
     *bytes_copied = s.output.len;