summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1999-07-30 21:03:22 +0000
committerMartin Baulig <martin@src.gnome.org>1999-07-30 21:03:22 +0000
commit91524799817c968c54d969dfdb17f2893de0ac57 (patch)
treebff836289c058c5afab1123919a5f3224b52e751 /examples
parent2814206ffa858ee32f37e70b94e1ddb72a2857f7 (diff)
downloadlibgtop-91524799817c968c54d969dfdb17f2893de0ac57.tar.gz
Fixed all warnings.
Diffstat (limited to 'examples')
-rw-r--r--examples/netload.c2
-rw-r--r--examples/smp.c2
-rw-r--r--examples/sysdeps.c2
-rw-r--r--examples/timings.c7
4 files changed, 5 insertions, 8 deletions
diff --git a/examples/netload.c b/examples/netload.c
index 6e905e2b..a16527ec 100644
--- a/examples/netload.c
+++ b/examples/netload.c
@@ -43,7 +43,7 @@ int
main (int argc, char *argv [])
{
glibtop_netload netload;
- unsigned method, count, port, i;
+ unsigned method, count, port;
struct in_addr addr, subnet;
char *address_string, *subnet_string;
char buffer [BUFSIZ];
diff --git a/examples/smp.c b/examples/smp.c
index 78e993e9..b8f88b4e 100644
--- a/examples/smp.c
+++ b/examples/smp.c
@@ -67,7 +67,7 @@ main (int argc, char *argv [])
memset (separator, '-', 91);
separator [92] = '\0';
- sprintf (buffer, _("Ticks (%d per second):"), frequency);
+ sprintf (buffer, _("Ticks (%ld per second):"), frequency);
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
diff --git a/examples/sysdeps.c b/examples/sysdeps.c
index a884f797..f2a40c51 100644
--- a/examples/sysdeps.c
+++ b/examples/sysdeps.c
@@ -38,7 +38,7 @@ int
main (int argc, char *argv [])
{
glibtop_sysdeps sysdeps;
- unsigned method, count, port, i;
+ unsigned method, count, port;
char buffer [BUFSIZ];
count = PROFILE_COUNT;
diff --git a/examples/timings.c b/examples/timings.c
index c131c6cf..10adff74 100644
--- a/examples/timings.c
+++ b/examples/timings.c
@@ -70,14 +70,11 @@ int
main (int argc, char *argv [])
{
glibtop_union data;
- glibtop_sysdeps sysdeps;
- unsigned c, count, port, i, *ptr;
+ unsigned c, count, *ptr;
struct rusage total_start, total_end;
struct rusage rusage_start, rusage_end;
struct timeval elapsed_utime, elapsed_stime;
- char buffer [BUFSIZ];
- pid_t pid, ppid;
- char *args;
+ pid_t pid;
count = PROFILE_COUNT;