From: Doug MacEachern Date: Thu, 22 Oct 2009 22:50:57 +0000 (-0700) Subject: surpress gcc warnings on FreeBSD X-Git-Tag: collectd-4.9.0~43 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d6590a386a2a4dcdc536a153a7bed5f13783b24d;p=collectd.git 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 --- 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;