From ff9fdfcb74a554c650a66fc214b188678a445a12 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Tue, 31 Oct 2023 22:34:27 +0000 Subject: [PATCH] console: Added a missing nodiscard marking for the Windows-specific handle() function --- substrate/console | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/console b/substrate/console index 970d4ffc..40c3d44e 100644 --- a/substrate/console +++ b/substrate/console @@ -60,7 +60,8 @@ namespace substrate SUBSTRATE_NO_DISCARD(constexpr bool valid() const noexcept) { return fd != -1; } SUBSTRATE_NO_DISCARD(constexpr bool isTTY() const noexcept) { return _tty; } #if defined(_WIN32) - void *handle() const noexcept { return reinterpret_cast(_get_osfhandle(fd)); } + SUBSTRATE_NO_DISCARD(void *handle() const noexcept) + { return reinterpret_cast(_get_osfhandle(fd)); } #endif void write(const void *buffer, size_t bufferLen) const noexcept;