summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-12-03 10:23:09 +0000
committerAndreas Kling <kling@serenityos.org>2021-12-05 15:31:03 +0100
commitc6a97ea84348a51fedd18d3a77de701a21d23e66 (patch)
tree44dd8fe5ea1b00e4cde8eb6e9050835eefab2f4f /Kernel/FileSystem
parent5013a6480d989b48c9a910cfe3c4ad19f0508597 (diff)
downloadserenity-c6a97ea84348a51fedd18d3a77de701a21d23e66.zip
Kernel: Mark kernel smart-pointer classes as [[nodiscard]]
And cast the unused return values to void.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/Plan9FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp
index 3834498616..98a7fcff5e 100644
--- a/Kernel/FileSystem/Plan9FileSystem.cpp
+++ b/Kernel/FileSystem/Plan9FileSystem.cpp
@@ -656,7 +656,7 @@ void Plan9FS::ensure_thread()
auto process_name = KString::try_create("Plan9FS");
if (process_name.is_error())
TODO();
- Process::create_kernel_process(m_thread, process_name.release_value(), [&]() {
+ (void)Process::create_kernel_process(m_thread, process_name.release_value(), [&]() {
thread_main();
m_thread_running.store(false, AK::MemoryOrder::memory_order_release);
});
diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp
index f3b524d7b2..b23fd30cd7 100644
--- a/Kernel/FileSystem/VirtualFileSystem.cpp
+++ b/Kernel/FileSystem/VirtualFileSystem.cpp
@@ -319,7 +319,7 @@ ErrorOr<void> VirtualFileSystem::mknod(StringView path, mode_t mode, dev_t dev,
auto basename = KLexicalPath::basename(path);
dbgln_if(VFS_DEBUG, "VirtualFileSystem::mknod: '{}' mode={} dev={} in {}", basename, mode, dev, parent_inode.identifier());
- TRY(parent_inode.create_child(basename, mode, dev, current_process.euid(), current_process.egid()));
+ (void)TRY(parent_inode.create_child(basename, mode, dev, current_process.euid(), current_process.egid()));
return {};
}
@@ -385,7 +385,7 @@ ErrorOr<void> VirtualFileSystem::mkdir(StringView path, mode_t mode, Custody& ba
auto basename = KLexicalPath::basename(path);
dbgln_if(VFS_DEBUG, "VirtualFileSystem::mkdir: '{}' in {}", basename, parent_inode.identifier());
- TRY(parent_inode.create_child(basename, S_IFDIR | mode, 0, current_process.euid(), current_process.egid()));
+ (void)TRY(parent_inode.create_child(basename, S_IFDIR | mode, 0, current_process.euid(), current_process.egid()));
return {};
}