From: Jim Warner Date: Tue, 25 Jan 2022 06:00:00 +0000 (-0600) Subject: top: avoid a potential warning '-Wmaybe-uninitialized' X-Git-Tag: v4.0.0~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1c6a69a615c6eb9d3f55ee565f7c50490751d39;p=procps-ng top: avoid a potential warning '-Wmaybe-uninitialized' Signed-off-by: Jim Warner --- diff --git a/top/top.c b/top/top.c index 96f20887..bd6ea3be 100644 --- a/top/top.c +++ b/top/top.c @@ -4614,7 +4614,7 @@ static void forest_begin (WIN_t *q) { static void forest_config (WIN_t *q) { // tailored 'results stack value' extractor macro #define rSv(x) PID_VAL(eu_TREE_LVL, s_int, q->ppt[(x)]) - int i, level; + int i, level = 0; for (i = 0; i < PIDSmaxt; i++) { if (q->focus_pid == PID_VAL(EU_PID, s_int, q->ppt[i])) {