From 09de734185a72afed53217cb44befbfd0f68399b Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 20 Feb 2017 18:10:04 +1100 Subject: [PATCH] posix/fd: label write/read calls with warn_unused --- posix/fd.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posix/fd.hpp b/posix/fd.hpp index 7573e9c6..05e00cf2 100644 --- a/posix/fd.hpp +++ b/posix/fd.hpp @@ -52,11 +52,11 @@ namespace util::posix { struct ::stat stat (void) const; //--------------------------------------------------------------------- - ssize_t read ( void *buf, size_t count); - ssize_t write (const void *buf, size_t count); + [[gnu::warn_unused_result]] ssize_t read ( void *buf, size_t count); + [[gnu::warn_unused_result]] ssize_t write (const void *buf, size_t count); //--------------------------------------------------------------------- - off_t lseek (off_t offset, int whence); + [[gnu::warn_unused_result]] off_t lseek (off_t offset, int whence); /////////////////////////////////////////////////////////////////////// operator int (void) const;