]> 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>
Tue, 1 Feb 2022 05:11:55 +0000 (16:11 +1100)
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index 26029c30542edd123d8265d24d452219e38f36f2..ec2343e926312e5d3e1e58b98dc2feb7b1083048 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -4925,7 +4925,7 @@ static inline const char *forest_display (const WIN_t *q, int idx) {
          * determines that window's 'focus_beg' plus 'focus_end' values. |
          * But, if the pid can no longer be found, he'll turn off focus! | */
 static void forest_excluded (WIN_t *q) {
-   int i, level;
+   int i, level = 0;
 
    for (i = 0; i < Frame_maxtask; i++) {
       if (q->focus_pid == q->ppt[i]->tid) {