summaryrefslogtreecommitdiff
path: root/include/fortify-headers.h
diff options
context:
space:
mode:
authorjvoisin2023-09-11 17:41:31 +0200
committerjvoisin2023-09-11 17:41:31 +0200
commit5ce4b94b7ac1d529b42ac76609b686d1ba0dffcb (patch)
tree6aaff589e9e302b28a9e517a5f2247676454967d /include/fortify-headers.h
parent07da6751b9d1a6498e81c9d3b97ec3b552fa0b38 (diff)
Add the warn_unused_result attribute to alloc-related functions
Diffstat (limited to 'include/fortify-headers.h')
-rw-r--r--include/fortify-headers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index dbace47..74c814b 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -110,6 +110,13 @@
110#define __error_if(cond, msg) 110#define __error_if(cond, msg)
111#endif 111#endif
112 112
113#if __has_attribute (warn_unused_result)
114#define __warn_unused_result __attribute__ ((warn_unused_result))
115#else
116#define __warn_unused_result
117#endif
118
119
113#endif /* __has_attribute */ 120#endif /* __has_attribute */
114 121
115/* 122/*