surpress gcc warnings on FreeBSD
authorDoug MacEachern <dougm@hyperic.com>
Thu, 22 Oct 2009 22:50:57 +0000 (15:50 -0700)
committerDoug MacEachern <dougm@hyperic.com>
Thu, 22 Oct 2009 22:50:57 +0000 (15:50 -0700)
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

index a9cfe60..5ef4acc 100644 (file)
@@ -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;