summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@humppa.nl>2011-06-16 13:00:47 +0200
committerJasper Lievisse Adriaanse <jasper@humppa.nl>2011-06-16 13:00:47 +0200
commitf8c573b78c2be5bf0bb248175b67767e6584b5e1 (patch)
tree06f713e1f7b84c1d212a192931452c38a5192471
parent49641cc3639909e76b6798041aa31d0169aea654 (diff)
downloadlibgtop-f8c573b78c2be5bf0bb248175b67767e6584b5e1.tar.gz
Silence various warnings in the OpenBSD code
-rw-r--r--sysdeps/openbsd/prockernel.c5
-rw-r--r--sysdeps/openbsd/proctime.c4
-rw-r--r--sysdeps/openbsd/sysinfo.c8
3 files changed, 7 insertions, 10 deletions
diff --git a/sysdeps/openbsd/prockernel.c b/sysdeps/openbsd/prockernel.c
index 1031e8c1..a55e6564 100644
--- a/sysdeps/openbsd/prockernel.c
+++ b/sysdeps/openbsd/prockernel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prockernel.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
+/* $OpenBSD: prockernel.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
/* Copyright (C) 1998 Joshua Sled
This file is part of LibGTop 1.0.
@@ -60,9 +60,6 @@ glibtop_get_proc_kernel_p (glibtop *server,
struct kinfo_proc2 *pinfo;
int count;
- char filename [BUFSIZ];
- struct stat statb;
-
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
memset (buf, 0, sizeof (glibtop_proc_kernel));
diff --git a/sysdeps/openbsd/proctime.c b/sysdeps/openbsd/proctime.c
index c4aeb6fc..6b8d8e4a 100644
--- a/sysdeps/openbsd/proctime.c
+++ b/sysdeps/openbsd/proctime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proctime.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
+/* $OpenBSD: proctime.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proc_time_user =
#define tv2sec(tv) (((guint64) tv.tv_sec * 1000000) + (guint64) tv.tv_usec)
static unsigned int clockrate;
-static const int mib [] = { CTL_KERN, KERN_CLOCKRATE };
+static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
/* Init function. */
diff --git a/sysdeps/openbsd/sysinfo.c b/sysdeps/openbsd/sysinfo.c
index 9b748ba0..11d58eec 100644
--- a/sysdeps/openbsd/sysinfo.c
+++ b/sysdeps/openbsd/sysinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysinfo.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
+/* $OpenBSD: sysinfo.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
@@ -37,10 +37,10 @@ static glibtop_sysinfo sysinfo = { .flags = 0 };
static void
init_sysinfo (glibtop *server)
{
- char *model;
+ char *model = NULL;
int mib[2];
- int ncpus = 1;
- int mhz = 0;
+ guint ncpus = 1;
+ guint mhz = 0;
size_t len;
if (G_LIKELY (sysinfo.flags))