From d6590a386a2a4dcdc536a153a7bed5f13783b24d Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 22 Oct 2009 15:50:57 -0700 Subject: [PATCH] surpress gcc warnings on FreeBSD cc1: warnings being treated as errors processes.c: In function 'ps_read': processes.c:343: warning: 'pse.io_rchar' is used uninitialized in this function processes.c:1436: note: 'pse.io_rchar' was declared here processes.c:344: warning: 'pse.io_wchar' is used uninitialized in this function processes.c:1436: note: 'pse.io_wchar' was declared here processes.c:345: warning: 'pse.io_syscr' is used uninitialized in this function processes.c:1436: note: 'pse.io_syscr' was declared here processes.c:346: warning: 'pse.io_syscw' is used uninitialized in this function processes.c:1436: note: 'pse.io_syscw' was declared here --- src/processes.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/processes.c b/src/processes.c index a9cfe60b..5ef4acc0 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1510,6 +1510,12 @@ static int ps_read (void) * 1000 + procs[i].ki_rusage.ru_stime.tv_usec; + /* no io data */ + pse.io_rchar = -1; + pse.io_wchar = -1; + pse.io_syscr = -1; + pse.io_syscw = -1; + switch (procs[i].ki_stat) { case SSTOP: stopped++; break; -- 2.30.2