From 0fe7796df03fa1701af9332f4324fdaf2d63f4cb Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 19 Aug 2021 22:52:36 +0200 Subject: [PATCH] Fix Clang warning Without this, Clang would complain: ``` In file included from kitty/fonts.c:9: In file included from kitty/fonts.h:9: kitty/lineops.h:67:29: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] const CellAttrs zero = {0}; ^ {} ``` --- kitty/lineops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/lineops.h b/kitty/lineops.h index cde0c7858..1a9b3dbe5 100644 --- a/kitty/lineops.h +++ b/kitty/lineops.h @@ -64,7 +64,7 @@ left_shift_line(Line *line, index_type at, index_type num) { COPY_CELL(line, i + num, line, i); } const CellAttrs empty = {.width=1}; - const CellAttrs zero = {0}; + const CellAttrs zero = {{0}}; if (at < line->xnum && line->gpu_cells[at].attrs.width != 1) { line->cpu_cells[at].ch = BLANK_CHAR; line->cpu_cells[at].hyperlink_id = 0;