mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/clang-20-build-warnings'
* origin/topic/timw/clang-20-build-warnings: Silence -Wnontrivial-memcall warning in ConnKey methods
This commit is contained in:
commit
a289307e50
3 changed files with 11 additions and 5 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
|||
8.0.0-dev.367 | 2025-06-05 08:22:25 -0700
|
||||
|
||||
* Silence -Wnontrivial-memcall warning in ConnKey methods (Tim Wojtulewicz, Corelight)
|
||||
|
||||
8.0.0-dev.363 | 2025-06-05 07:15:59 +0100
|
||||
|
||||
* dpd.log to analyzer.log changes:
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
8.0.0-dev.365
|
||||
8.0.0-dev.367
|
||||
|
|
|
@ -33,8 +33,9 @@ ConnKey& ConnKey::operator=(const ConnKey& rhs) {
|
|||
|
||||
// Because of padding in the object, this needs to memset to clear out
|
||||
// the extra memory used by padding. Otherwise, the session key stuff
|
||||
// doesn't work quite right.
|
||||
memset(this, 0, sizeof(ConnKey));
|
||||
// doesn't work quite right. The static_cast is to silence a
|
||||
// -Wnontrival-memcall warning from clang++ 17 and later.
|
||||
memset(static_cast<void*>(this), 0, sizeof(ConnKey));
|
||||
|
||||
memcpy(&ip1, &rhs.ip1, sizeof(in6_addr));
|
||||
memcpy(&ip2, &rhs.ip2, sizeof(in6_addr));
|
||||
|
@ -104,8 +105,9 @@ void ConnKey::Init(const IPAddr& src, const IPAddr& dst, uint16_t src_port, uint
|
|||
bool one_way) {
|
||||
// Because of padding in the object, this needs to memset to clear out
|
||||
// the extra memory used by padding. Otherwise, the session key stuff
|
||||
// doesn't work quite right.
|
||||
memset(this, 0, sizeof(ConnKey));
|
||||
// doesn't work quite right. The static_cast is to silence a
|
||||
// -Wnontrival-memcall warning from clang++ 17 and later.
|
||||
memset(static_cast<void*>(this), 0, sizeof(ConnKey));
|
||||
|
||||
// Lookup up connection based on canonical ordering, which is
|
||||
// the smaller of <src addr, src port> and <dst addr, dst port>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue