From 3ac0a96ccab02dae69ff008a2f433aea18413654 Mon Sep 17 00:00:00 2001 From: Matthew Kendall Date: Wed, 10 Jul 2024 23:23:11 -0700 Subject: [PATCH] fix(refr): eliminate side effect in assert (#6499) --- src/core/lv_refr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 1b8d26c06..8430f70b0 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -584,13 +584,14 @@ static void refr_invalid_areas(void) */ static void layer_reshape_draw_buf(lv_layer_t * layer) { - LV_ASSERT(lv_draw_buf_reshape( - layer->draw_buf, - layer->color_format, - lv_area_get_width(&layer->buf_area), - lv_area_get_height(&layer->buf_area), - 0) - != NULL); + lv_draw_buf_t * ret = lv_draw_buf_reshape( + layer->draw_buf, + layer->color_format, + lv_area_get_width(&layer->buf_area), + lv_area_get_height(&layer->buf_area), + 0); + LV_UNUSED(ret); + LV_ASSERT_NULL(ret); } /**