kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used but then immediately discarded, which is a potential cause of locking/unlocking bugs.
This commit is contained in:
		| @@ -289,7 +289,7 @@ private: | ||||
|  | ||||
| class SchedulerLock { | ||||
| public: | ||||
|     explicit SchedulerLock(KernelCore& kernel); | ||||
|     [[nodiscard]] explicit SchedulerLock(KernelCore& kernel); | ||||
|     ~SchedulerLock(); | ||||
|  | ||||
| protected: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user