[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH,v2,15/15] lib/ukring: Fix unitialized variable
This fix introduces the `ret` variable within the `uk_ring_peek_clear_single` function when compiled with ukdebug. Signed-off-by: Alexander Jung <alexander.jung@xxxxxxxxx> --- lib/ukring/include/uk/ring.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ukring/include/uk/ring.h b/lib/ukring/include/uk/ring.h index 49f9dfe..af113b4 100644 --- a/lib/ukring/include/uk/ring.h +++ b/lib/ukring/include/uk/ring.h @@ -372,8 +372,10 @@ uk_ring_peek(struct uk_ring *r) static __inline void * uk_ring_peek_clear_single(struct uk_ring *r) { -#ifdef CONFIG_LIBUKDEBUG_PRINTK_CRIT +#ifdef CONFIG_LIBUKDEBUG void *ret; +#endif /* CONFIG_LIBUKDEBUG */ +#ifdef CONFIG_LIBUKDEBUG_PRINTK_CRIT if (!uk_mutex_is_locked(r->lock)) uk_pr_crit("lock not held on single consumer dequeue\n"); -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |