From 87a80ba43055b107e06cc6614fa73a15e2cc6c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Thu, 3 Apr 2008 16:29:55 +0000 Subject: [PATCH] Fixed warnings about proclist returning pid_t. svn path=/trunk/; revision=2728 --- examples/first.c | 4 ++-- examples/proclist.c | 2 +- examples/second.c | 3 ++- examples/timings.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/first.c b/examples/first.c index 6ef5819d..7babff80 100644 --- a/examples/first.c +++ b/examples/first.c @@ -47,9 +47,9 @@ main (int argc, char *argv []) { glibtop_union data; glibtop_sysdeps sysdeps; - unsigned c, method, count, port, i, *ptr; + unsigned c, method, count, port, i; char buffer [BUFSIZ]; - pid_t pid, ppid; + pid_t pid, ppid, *ptr; char *args; count = PROFILE_COUNT; diff --git a/examples/proclist.c b/examples/proclist.c index 542e8e98..db74e978 100644 --- a/examples/proclist.c +++ b/examples/proclist.c @@ -11,7 +11,7 @@ static void print_pids(guint64 which, guint64 arg) { - unsigned *pids; + pid_t *pids; unsigned i; glibtop_proclist buf; diff --git a/examples/second.c b/examples/second.c index ac55462c..9bece34d 100644 --- a/examples/second.c +++ b/examples/second.c @@ -239,7 +239,8 @@ main (int argc, char *argv []) { glibtop_proclist proclist; glibtop_sysdeps sysdeps; - unsigned *ptr, pid, i; + unsigned i; + pid_t *ptr, pid; setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR); diff --git a/examples/timings.c b/examples/timings.c index 8e3495b3..87887388 100644 --- a/examples/timings.c +++ b/examples/timings.c @@ -73,11 +73,11 @@ int main (int argc, char *argv []) { glibtop_union data; - unsigned c, count, *ptr; + unsigned c, count; struct rusage total_start, total_end; struct rusage rusage_start, rusage_end; struct timeval elapsed_utime, elapsed_stime; - pid_t pid; + pid_t pid, *ptr; count = PROFILE_COUNT;