]> granicus.if.org Git - procps-ng/commitdiff
top: avoid a potential warning '-Wmaybe-uninitialized'
authorJim Warner <james.warner@comcast.net>
Tue, 25 Jan 2022 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Mon, 31 Jan 2022 07:10:48 +0000 (18:10 +1100)
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index 96f208874211143a6ea0a0a4d40d661110e3bdaa..bd6ea3be54fdbf934a34932a65257c3bd4f1219b 100644 (file)
--- 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])) {