From dd1eed7c1ba83913d9d276911920242bca466dab Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 31 Oct 2019 19:57:30 -0400 Subject: [PATCH] Handle a GCC warning in lv_draw_triangle --- src/lv_draw/lv_draw_triangle.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 9615555c7..290b6288e 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -85,6 +85,10 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * clip, const l i_left = 0; i_right = 1; break; + default: + /*Shouldn't happen, but GCC will complain if we don't handle it*/ + LV_LOG_WARN("lv_draw_triangle: unexpected condition for y_min_i"); + return; /*Bail here*/ } if(points[i_right].x < points[i_left].x) {