From 205a85b5d6ac26fb6014ebcdcebc7ab178e18f23 Mon Sep 17 00:00:00 2001 From: Carlos Diaz Date: Thu, 30 Dec 2021 15:04:49 -0600 Subject: [PATCH] fix(indev) add braces to avoid compiler warning (#2947) --- src/core/lv_indev.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/core/lv_indev.c b/src/core/lv_indev.c index 473badca4f..106b13f387 100644 --- a/src/core/lv_indev.c +++ b/src/core/lv_indev.c @@ -345,12 +345,18 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Simple sanity check*/ - if(data->point.x < 0) LV_LOG_WARN("X is %d which is smaller than zero", data->point.x); - if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) LV_LOG_WARN("X is %d which is greater than hor. res", - data->point.x); - if(data->point.y < 0) LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y); - if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) LV_LOG_WARN("Y is %d which is greater than ver. res", - data->point.y); + if(data->point.x < 0) { + LV_LOG_WARN("X is %d which is smaller than zero", data->point.x); + } + if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) { + LV_LOG_WARN("X is %d which is greater than hor. res", data->point.x); + } + if(data->point.y < 0) { + LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y); + } + if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) { + LV_LOG_WARN("Y is %d which is greater than ver. res", data->point.y); + } /*Move the cursor if set and moved*/ if(i->cursor != NULL &&