aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-06-12 19:26:00 +0200
committerMattias Andrée <maandree@kth.se>2022-06-12 19:26:00 +0200
commitca8c0059f3e86eb178733d7fa9a8b0ba20d9c2ca (patch)
tree838569a039cffafacd217a7bb889f12a20be62bd /libsimple.h
parentReplace to last static inline's with line + extern inline, and fix warnings (diff)
downloadlibsimple-ca8c0059f3e86eb178733d7fa9a8b0ba20d9c2ca.tar.gz
libsimple-ca8c0059f3e86eb178733d7fa9a8b0ba20d9c2ca.tar.bz2
libsimple-ca8c0059f3e86eb178733d7fa9a8b0ba20d9c2ca.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libsimple.h')
-rw-r--r--libsimple.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libsimple.h b/libsimple.h
index b9e263c..ffb8f8a 100644
--- a/libsimple.h
+++ b/libsimple.h
@@ -116,6 +116,15 @@
LIBSIMPLE_PRE_C11_ONLY__(LIBSIMPLE_GCC_ONLY__(__assume_aligned__(__alignof(TYPE))))
+#if __STDC_VERSION__ >= 201112L
+# define LIBSIMPLE_NORETURN _Noreturn /* TODO doc, man */
+#elif defined(__GNUC__) || defined(__clang__)
+# define LIBSIMPLE_NORETURN __attribute__((noreturn))
+#else
+# define LIBSIMPLE_NORETURN
+#endif
+
+
#include "libsimple/overflow.h"
#include "libsimple/printf.h"
#include "libsimple/definitions.h"
@@ -269,6 +278,7 @@ libsimple_unlist(void *list__, size_t i__, size_t *np__, size_t width__)
+
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic pop
#endif