libgtop r2728 - trunk/examples
- From: bdejean svn gnome org
- To: svn-commits-list gnome org
- Subject: libgtop r2728 - trunk/examples
- Date: Thu, 3 Apr 2008 17:29:55 +0100 (BST)
Author: bdejean
Date: Thu Apr 3 17:29:55 2008
New Revision: 2728
URL: http://svn.gnome.org/viewvc/libgtop?rev=2728&view=rev
Log:
Fixed warnings about proclist returning pid_t.
Modified:
trunk/examples/first.c
trunk/examples/proclist.c
trunk/examples/second.c
trunk/examples/timings.c
Modified: trunk/examples/first.c
==============================================================================
--- trunk/examples/first.c (original)
+++ trunk/examples/first.c Thu Apr 3 17:29:55 2008
@@ -47,9 +47,9 @@
{
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;
Modified: trunk/examples/proclist.c
==============================================================================
--- trunk/examples/proclist.c (original)
+++ trunk/examples/proclist.c Thu Apr 3 17:29:55 2008
@@ -11,7 +11,7 @@
static void print_pids(guint64 which, guint64 arg)
{
- unsigned *pids;
+ pid_t *pids;
unsigned i;
glibtop_proclist buf;
Modified: trunk/examples/second.c
==============================================================================
--- trunk/examples/second.c (original)
+++ trunk/examples/second.c Thu Apr 3 17:29:55 2008
@@ -239,7 +239,8 @@
{
glibtop_proclist proclist;
glibtop_sysdeps sysdeps;
- unsigned *ptr, pid, i;
+ unsigned i;
+ pid_t *ptr, pid;
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
Modified: trunk/examples/timings.c
==============================================================================
--- trunk/examples/timings.c (original)
+++ trunk/examples/timings.c Thu Apr 3 17:29:55 2008
@@ -73,11 +73,11 @@
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]