summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-10-07 13:51:24 -0400
committerAndreas Kling <kling@serenityos.org>2021-10-08 23:33:46 +0200
commit1cdb12e9208dda820af036570ba97cb4a70b229c (patch)
tree41f30a34919a99250b8e714d12aa7a579836ca27 /Kernel/Net
parente84c03ad61d0bd6590e11babff971ecfadebb195 (diff)
downloadserenity-1cdb12e9208dda820af036570ba97cb4a70b229c.zip
Kernel: Fix -Wunreachable-code warnings from clang
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/LocalSocket.cpp2
-rw-r--r--Kernel/Net/NetworkTask.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp
index 74dd109598..fd6895237c 100644
--- a/Kernel/Net/LocalSocket.cpp
+++ b/Kernel/Net/LocalSocket.cpp
@@ -413,7 +413,7 @@ KResult LocalSocket::getsockopt(OpenFileDescription& description, int level, int
default:
return EINVAL;
}
- break;
+ VERIFY_NOT_REACHED();
}
default:
return Socket::getsockopt(description, level, option, value, value_size);
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp
index 5450bf30e0..e49f6f530a 100644
--- a/Kernel/Net/NetworkTask.cpp
+++ b/Kernel/Net/NetworkTask.cpp
@@ -531,8 +531,8 @@ void handle_tcp(IPv4Packet const& ipv4_packet, Time const& packet_timestamp)
socket->set_state(TCPSocket::State::Closed);
return;
}
+ VERIFY_NOT_REACHED();
- return;
case TCPFlags::SYN:
dbgln("handle_tcp: ignoring SYN for partially established connection");
return;