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 <g.esp@free.fr>
This commit is contained in:
Gilles Espinasse 2013-03-26 11:21:39 +01:00 committed by Craig Small
parent bccc2404b6
commit d164f47dd1

2
pmap.c
View File

@ -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.