From d164f47dd1940060a896af03ee2603bc416b8215 Mon Sep 17 00:00:00 2001 From: Gilles Espinasse Date: Tue, 26 Mar 2013 11:21:39 +0100 Subject: [PATCH] procps-ng : fix pmap uninitialized warnings pmap.c: In function 'one_proc': pmap.c:529: warning: 'maxw1' may be used uninitialized in this function pmap.c:529: warning: 'maxw2' may be used uninitialized in this function pmap.c:529: warning: 'maxw3' may be used uninitialized in this function pmap.c:529: warning: 'maxw4' may be used uninitialized in this function pmap.c:529: warning: 'maxw5' may be used uninitialized in this function Without -d and -x option, that should be doable to trigger the issue but I haven't found how Signed-off-by: Gilles Espinasse --- pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmap.c b/pmap.c index 860f757a..09e4e367 100644 --- a/pmap.c +++ b/pmap.c @@ -525,7 +525,7 @@ static int one_proc(proc_t * p) unsigned long long total_rss = 0ull; unsigned long long total_private_dirty = 0ull; unsigned long long total_shared_dirty = 0ull; - int maxw1, maxw2, maxw3, maxw4, maxw5; + int maxw1=0, maxw2=0, maxw3=0, maxw4=0, maxw5=0; /* Overkill, but who knows what is proper? The "w" prog uses * the tty width to determine this.