io/FileDescriptor: add [[nodiscard]]

This commit is contained in:
Max Kellermann
2024-01-11 16:59:44 +01:00
committed by Max Kellermann
parent 3e862b85d4
commit b63a794fbe
4 changed files with 31 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ static inline UniqueFileDescriptor
OpenFile(Path file, int flags, int mode)
{
UniqueFileDescriptor fd;
fd.Open(file.c_str(), flags, mode);
(void)fd.Open(file.c_str(), flags, mode);
return fd;
}