summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp4
-rw-r--r--Kernel/FileSystem/FileDescription.cpp3
-rw-r--r--Kernel/FileSystem/Plan9FileSystem.cpp9
-rw-r--r--Kernel/Net/TCPSocket.cpp3
-rw-r--r--Kernel/Scheduler.cpp3
-rw-r--r--Kernel/Syscalls/execve.cpp3
-rw-r--r--Kernel/TTY/TTY.cpp13
7 files changed, 23 insertions, 15 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 2ae94dbc1d..b537eb4df8 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -1477,11 +1477,13 @@ void Ext2FSInode::populate_lookup_cache() const
return;
HashMap<String, unsigned> children;
- traverse_as_directory([&children](auto& entry) {
+ KResult result = traverse_as_directory([&children](auto& entry) {
children.set(String(entry.name, entry.name_length), entry.inode.index());
return true;
});
+ ASSERT(result.is_success());
+
if (!m_lookup_cache.is_empty())
return;
m_lookup_cache = move(children);
diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp
index c47699ebea..662176ddf4 100644
--- a/Kernel/FileSystem/FileDescription.cpp
+++ b/Kernel/FileSystem/FileDescription.cpp
@@ -70,7 +70,8 @@ FileDescription::~FileDescription()
socket()->detach(*this);
if (is_fifo())
static_cast<FIFO*>(m_file.ptr())->detach(m_fifo_direction);
- m_file->close();
+ // FIXME: Should this error path be observed somehow?
+ (void)m_file->close();
m_inode = nullptr;
}
diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp
index ddd2c6b9aa..de7c5fd3e3 100644
--- a/Kernel/FileSystem/Plan9FileSystem.cpp
+++ b/Kernel/FileSystem/Plan9FileSystem.cpp
@@ -636,7 +636,8 @@ Plan9FSInode::~Plan9FSInode()
{
Plan9FS::Message clunk_request { fs(), Plan9FS::Message::Type::Tclunk };
clunk_request << fid();
- fs().post_message_and_explicitly_ignore_reply(clunk_request);
+ // FIXME: Should we observe this error somehow?
+ (void)fs().post_message_and_explicitly_ignore_reply(clunk_request);
}
KResult Plan9FSInode::ensure_open_for_mode(int mode)
@@ -829,7 +830,8 @@ KResult Plan9FSInode::traverse_as_directory(Function<bool(const FS::DirectoryEnt
if (result.is_error()) {
Plan9FS::Message close_message { fs(), Plan9FS::Message::Type::Tclunk };
close_message << clone_fid;
- fs().post_message_and_explicitly_ignore_reply(close_message);
+ // FIXME: Should we observe this error?
+ (void)fs().post_message_and_explicitly_ignore_reply(close_message);
return result;
}
}
@@ -871,7 +873,8 @@ KResult Plan9FSInode::traverse_as_directory(Function<bool(const FS::DirectoryEnt
Plan9FS::Message close_message { fs(), Plan9FS::Message::Type::Tclunk };
close_message << clone_fid;
- fs().post_message_and_explicitly_ignore_reply(close_message);
+ // FIXME: Should we observe this error?
+ (void)fs().post_message_and_explicitly_ignore_reply(close_message);
return result;
} else {
// TODO
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index 1f85b78be0..58a41f12d7 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -138,7 +138,8 @@ void TCPSocket::release_for_accept(RefPtr<TCPSocket> socket)
{
ASSERT(m_pending_release_for_accept.contains(socket->tuple()));
m_pending_release_for_accept.remove(socket->tuple());
- queue_connection_from(*socket);
+ // FIXME: Should we observe this error somehow?
+ (void)queue_connection_from(*socket);
}
TCPSocket::TCPSocket(int protocol)
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index 049002836e..976a8f18ca 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -384,7 +384,8 @@ bool Scheduler::pick_next()
}
if (process.m_alarm_deadline && g_uptime > process.m_alarm_deadline) {
process.m_alarm_deadline = 0;
- process.send_signal(SIGALRM, nullptr);
+ // FIXME: Should we observe this signal somehow?
+ (void)process.send_signal(SIGALRM, nullptr);
}
return IterationDecision::Continue;
});
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index f5d6c552cf..a74dd301e4 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -246,7 +246,8 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
for (size_t i = 0; i < m_fds.size(); ++i) {
auto& description_and_flags = m_fds[i];
if (description_and_flags.description() && description_and_flags.flags() & FD_CLOEXEC) {
- description_and_flags.description()->close();
+ // FIXME: Should this error path be observed somehow?
+ (void)description_and_flags.description()->close();
description_and_flags = {};
}
}
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index 589149e259..1743bf86d2 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -55,9 +55,8 @@ void TTY::set_default_termios()
KResultOr<size_t> TTY::read(FileDescription&, size_t, u8* buffer, size_t size)
{
if (Process::current()->pgid() != pgid()) {
- KResult result = Process::current()->send_signal(SIGTTIN, nullptr);
- if (result.is_error())
- return result;
+ // FIXME: Should we propigate this error path somehow?
+ (void)Process::current()->send_signal(SIGTTIN, nullptr);
return KResult(-EINTR);
}
@@ -93,9 +92,8 @@ KResultOr<size_t> TTY::read(FileDescription&, size_t, u8* buffer, size_t size)
KResultOr<size_t> TTY::write(FileDescription&, size_t, const u8* buffer, size_t size)
{
if (Process::current()->pgid() != pgid()) {
- KResult result = Process::current()->send_signal(SIGTTOU, nullptr);
- if (result.is_error())
- return result;
+ // FIXME: Should we propigate this error path somehow?
+ (void)Process::current()->send_signal(SIGTTOU, nullptr);
return KResult(-EINTR);
}
@@ -255,7 +253,8 @@ void TTY::generate_signal(int signal)
InterruptDisabler disabler; // FIXME: Iterate over a set of process handles instead?
Process::for_each_in_pgrp(pgid(), [&](auto& process) {
dbg() << tty_name() << ": Send signal " << signal << " to " << process;
- process.send_signal(signal, nullptr);
+ // FIXME: Should this error be propagated somehow?
+ (void)process.send_signal(signal, nullptr);
return IterationDecision::Continue;
});
}