build: prefer nodiscard over warn_unused_result

This commit is contained in:
Danny Robson 2018-02-01 13:47:42 +11:00
parent fd03c344b2
commit 8c8a252d9f
3 changed files with 5 additions and 5 deletions

View File

@ -63,8 +63,8 @@ namespace util::posix {
int release (void);
//---------------------------------------------------------------------
[[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);
[[nodiscard]] ssize_t read (void *buf, size_t count);
[[nodiscard]] ssize_t write (const void *buf, size_t count);
//---------------------------------------------------------------------

View File

@ -81,8 +81,8 @@ namespace util {
~signal ();
/// Add a callback to list.
cookie connect [[gnu::warn_unused_result]] (callback&&);
cookie connect [[gnu::warn_unused_result]] (const callback&);
cookie connect [[nodiscard]] (callback&&);
cookie connect [[nodiscard]] (const callback&);
void disconnect (cookie&);

View File

@ -288,7 +288,7 @@ namespace util {
}
//---------------------------------------------------------------------
[[gnu::warn_unused_result]] constexpr auto
[[nodiscard]] constexpr auto
redim (size_type count) const
{
assert (count > 0);