From f12754ee10ae1a1fcf4b5cf8b18fd06b5f4c13d2 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 14 Feb 2021 15:06:10 -0800 Subject: [PATCH] Kernel: Mark BlockResult as [[nodiscard]] In the majority of cases we want to force callers to observe the result of a blocking operation as it's not grantee to succeed as they expect. Mark BlockResult as [[nodiscard]] to force any callers to observe the result of the blocking operation. --- Kernel/Thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Thread.h b/Kernel/Thread.h index b4dfae9c1d6..3a21480b747 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -155,7 +155,7 @@ public: Blocked }; - class BlockResult { + class [[nodiscard]] BlockResult { public: enum Type { WokeNormally,