Silence various warnings in the OpenBSD code

This commit is contained in:
Jasper Lievisse Adriaanse
2011-06-16 13:00:47 +02:00
parent 49641cc363
commit f8c573b78c
3 changed files with 7 additions and 10 deletions

View File

@@ -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 /* Copyright (C) 1998 Joshua Sled
This file is part of LibGTop 1.0. This file is part of LibGTop 1.0.
@@ -60,9 +60,6 @@ glibtop_get_proc_kernel_p (glibtop *server,
struct kinfo_proc2 *pinfo; struct kinfo_proc2 *pinfo;
int count; int count;
char filename [BUFSIZ];
struct stat statb;
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0); glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
memset (buf, 0, sizeof (glibtop_proc_kernel)); memset (buf, 0, sizeof (glibtop_proc_kernel));

View File

@@ -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 /* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0. 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) #define tv2sec(tv) (((guint64) tv.tv_sec * 1000000) + (guint64) tv.tv_usec)
static unsigned int clockrate; static unsigned int clockrate;
static const int mib [] = { CTL_KERN, KERN_CLOCKRATE }; static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
/* Init function. */ /* Init function. */

View File

@@ -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 /* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0. This file is part of LibGTop 1.0.
@@ -37,10 +37,10 @@ static glibtop_sysinfo sysinfo = { .flags = 0 };
static void static void
init_sysinfo (glibtop *server) init_sysinfo (glibtop *server)
{ {
char *model; char *model = NULL;
int mib[2]; int mib[2];
int ncpus = 1; guint ncpus = 1;
int mhz = 0; guint mhz = 0;
size_t len; size_t len;
if (G_LIKELY (sysinfo.flags)) if (G_LIKELY (sysinfo.flags))