summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-12-20 18:34:49 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-12-20 20:19:18 -0500
commit2f3653bf522ce079501254bfd34abbf884dc528e (patch)
treec4293033143166e6a52a6e5a03b618d60bd18f3e
parenta85fc263a89fb89bc8b2a8166747660a177b1773 (diff)
downloadbfs-2f3653bf522ce079501254bfd34abbf884dc528e.tar.xz
config: Fix attr_nodiscard to use warn_unused_result
-rw-r--r--src/config.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.h b/src/config.h
index 46f1efe..91cef71 100644
--- a/src/config.h
+++ b/src/config.h
@@ -212,8 +212,8 @@ typedef long double max_align_t;
*/
#if __has_c_attribute(nodiscard)
# define attr_nodiscard [[nodiscard]]
-#elif __has_attribute(nodiscard)
-# define attr_nodiscard __attribute__((nodiscard))
+#elif __has_attribute(warn_unused_result)
+# define attr_nodiscard __attribute__((warn_unused_result))
#else
# define attr_nodiscard
#endif