aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/alloc.h6
-rw-r--r--include/errors.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/alloc.h b/include/alloc.h
index 0237334..01863aa 100644
--- a/include/alloc.h
+++ b/include/alloc.h
@@ -20,8 +20,8 @@ typedef struct {
size_t _init;
} arena;
-[[gnu::returns_nonnull]] void *bufalloc(void *, size_t, size_t);
-void *bufalloc_noterm(void *, size_t, size_t);
+[[nodiscard, gnu::returns_nonnull]] void *bufalloc(void *, size_t, size_t);
+[[nodiscard]] void *bufalloc_noterm(void *, size_t, size_t);
[[_mlib_pure, _mlib_inline]]
static inline arena
@@ -30,7 +30,7 @@ mkarena(size_t n)
return (arena){._init = n ? n : MLIB_ARENA_BLKSIZE};
}
-[[gnu::malloc, gnu::alloc_size(2, 3), gnu::alloc_align(4)]]
+[[nodiscard, gnu::malloc, gnu::alloc_size(2, 3), gnu::alloc_align(4)]]
void *arena_alloc(arena *, size_t, size_t, size_t);
void arena_zero(arena *);
diff --git a/include/errors.h b/include/errors.h
index 6e8cbce..961ecf1 100644
--- a/include/errors.h
+++ b/include/errors.h
@@ -15,7 +15,7 @@ extern const char *_mlib_errors_progname;
void mlib_setprogname(const char *);
-[[_mlib_inline]]
+[[nodiscard, _mlib_inline]]
static inline const char *
mlib_progname(void)
{