silence warnings when compiling with -DNDEBUG

Change-Id: I46d16f6c083d281622ce71644bcf8d224e0b36b7
pull/734/head
Richard Fuchs 6 years ago
parent 357474df6f
commit d279789e23

@ -327,6 +327,7 @@ static int __bencode_iovec_dump(struct iovec *out, bencode_item_t *item) {
out += __bencode_iovec_cpy(out, &item->iov[1], 1);
assert((out - orig) == item->iov_cnt);
(void) orig;
return item->iov_cnt;
}
@ -349,6 +350,7 @@ static int __bencode_str_dump(char *out, bencode_item_t *item) {
out += __bencode_str_cpy(out, &item->iov[1], 1);
assert((out - orig) == item->str_len);
(void) orig;
*out = '\0';
return item->str_len;
}

@ -135,6 +135,7 @@ static void control_ng_incoming(struct obj *obj, str *buf, const endpoint_t *sin
int ret = bencode_buffer_init(&bencbuf);
assert(ret == 0);
(void) ret;
resp = bencode_dictionary(&bencbuf);
assert(resp != NULL);

@ -83,6 +83,7 @@ INLINE void __dtls_hash(const struct dtls_hash_func *hash_func, X509 *cert, unsi
assert(bufsize >= hash_func->num_bytes);
n = hash_func->__func(out, cert);
assert(n == hash_func->num_bytes);
(void) n;
}
#define dtls_hash(hash_func, cert, outbuf) __dtls_hash(hash_func, cert, outbuf, sizeof(outbuf))

@ -68,6 +68,7 @@ int uint32_eq(const void *a, const void *b);
INLINE void random_string(unsigned char *buf, int len) {
int ret = RAND_bytes(buf, len);
assert(ret == 1);
(void) ret;
}

@ -66,6 +66,7 @@ INLINE int bitstr_shift_ret(bitstr *b, unsigned int bits, str *ret) {
unsigned int int_bytes = b->bit_offset / 8;
int shift_ret = str_shift(&b->s, int_bytes);
assert(shift_ret == 0);
(void) shift_ret;
b->bit_offset -= int_bytes * 8;
return 0;

Loading…
Cancel
Save