diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2022-05-07 17:41:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-12 13:12:37 +0200 |
commit | 014b9fd709db11890e403617930646aed1270cb7 (patch) | |
tree | 6b129eb54aaf8f698a074f2f71c6e86e68083fb8 /Userland/Services/DHCPClient | |
parent | f40b6fbd0723e4c758d7e7f2fad048f7d89b3600 (diff) | |
download | serenity-014b9fd709db11890e403617930646aed1270cb7.zip |
AK+DHCPClient: Fix false positive gcc 12 warnings
The compiler would complain about `__builtin_memcpy` in ByteBuffer::copy
writing out of bounds, as it isn't able to deduce the invariant that the
inline buffer is only used when the requested size is smaller than the
inline capacity.
The other change is more bizarre. If the destructor's declaration
exists, gcc complains about a `delete` operation causing an
out-of-bounds array access.
error: array subscript 'DHCPv4Client::__as_base [0]' is partly outside
array bounds of 'unsigned char [8]' [-Werror=array-bounds]
14 | ~DHCPv4Client() = default;
| ^
This looks like a compiler bug, and I'll report it if I find a suitable
reduced reproducer.
Diffstat (limited to 'Userland/Services/DHCPClient')
-rw-r--r-- | Userland/Services/DHCPClient/DHCPv4Client.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.h b/Userland/Services/DHCPClient/DHCPv4Client.h index d14deebd16..6e7146d36a 100644 --- a/Userland/Services/DHCPClient/DHCPv4Client.h +++ b/Userland/Services/DHCPClient/DHCPv4Client.h @@ -40,8 +40,6 @@ class DHCPv4Client final : public Core::Object { C_OBJECT(DHCPv4Client) public: - virtual ~DHCPv4Client() override = default; - void dhcp_discover(InterfaceDescriptor const& ifname); void dhcp_request(DHCPv4Transaction& transaction, DHCPv4Packet const& packet); |