Fix unused var warning in release mode
@@ -159,7 +159,8 @@ size_t cbor_serialize_alloc(const cbor_item_t *item, unsigned char **buffer,
return 0;
}
- size_t written = cbor_serialize(item, *buffer, serialized_size);
+ size_t written __attribute__((unused)) =
+ cbor_serialize(item, *buffer, serialized_size);
CBOR_ASSERT(written == serialized_size);
if (buffer_size != NULL) *buffer_size = serialized_size;
return serialized_size;
