diff options
author | Richard Braun <rbraun@sceen.net> | 2017-09-01 23:58:41 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-09-02 15:25:37 +0200 |
commit | d18d0e85596f90e0bd597b33d58209d0b3973c95 (patch) | |
tree | 6c3472f59cf64244ab86d2fc13b220b1c8f61165 /kern/cbuf.c | |
parent | 897ad6a062ea2a32a2759613608faf3271211832 (diff) |
Make assert have no side effects
This makes sure symbols referenced by assert uses may not be generated
if unused. The recently introduced __unused macro is used to suppress
compiler warnings resulting from this change.
Diffstat (limited to 'kern/cbuf.c')
-rw-r--r-- | kern/cbuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/cbuf.c b/kern/cbuf.c index 2093f428..eca0c33c 100644 --- a/kern/cbuf.c +++ b/kern/cbuf.c @@ -72,7 +72,7 @@ cbuf_push(struct cbuf *cbuf, const void *buf, size_t size, bool erase) int cbuf_pop(struct cbuf *cbuf, void *buf, size_t *sizep) { - int error; + __unused int error; if (cbuf_size(cbuf) == 0) { return ERROR_AGAIN; |