From: Sascha Kruse Date: Mon, 10 Dec 2012 18:13:05 +0000 (+0100) Subject: render_con: initialize int sizes[children] X-Git-Tag: 4.5~89 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d4a93486423113737b64a836b8c5710cae46bcf;p=i3%2Fi3 render_con: initialize int sizes[children] This fixes a clang-analyzer warning --- diff --git a/src/render.c b/src/render.c index 1216241b..476d1ca8 100644 --- a/src/render.c +++ b/src/render.c @@ -202,6 +202,7 @@ void render_con(Con *con, bool render_fullscreen) { /* precalculate the sizes to be able to correct rounding errors */ int sizes[children]; + memset(sizes, 0, children*sizeof(int)); if ((con->layout == L_SPLITH || con->layout == L_SPLITV) && children > 0) { assert(!TAILQ_EMPTY(&con->nodes_head)); Con *child;