From ca423bcb01877461c96eca6ae7c72cf41477e0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 1 Jan 2021 21:00:27 +0100 Subject: [PATCH] box-drawing: silence variable-may-not-be-initialized warnings --- box-drawing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/box-drawing.c b/box-drawing.c index 1da99577..a3a973cf 100644 --- a/box-drawing.c +++ b/box-drawing.c @@ -158,7 +158,7 @@ draw_box_drawings_dash_horizontal(uint8_t *buf, int width, int height, int strid int remaining = width - count * dash_width - gap_count * gap; - int x[4]; + int x[4] = {0}; int w[4] = {dash_width, dash_width, dash_width, dash_width}; x[0] = 0; @@ -214,7 +214,7 @@ draw_box_drawings_dash_vertical(uint8_t *buf, int width, int height, int stride, int remaining = height - count * dash_height - gap_count * gap; - int y[4]; + int y[4] = {0}; int h[4] = {dash_height, dash_height, dash_height, dash_height}; y[0] = 0;