summaryrefslogtreecommitdiff
path: root/get_load.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-16 18:44:12 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-28 04:19:17 -0200
commit0436471fd8007826d40a2f57710e9964c0768d50 (patch)
tree55c9523445967d19599582e062e7b5ad4c6121d4 /get_load.c
parentb91f8e903b1004a35dfe01204852c628367475b7 (diff)
Compile warning fixes.
Ansify some functions with K&R definitions.
Diffstat (limited to 'get_load.c')
-rw-r--r--get_load.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/get_load.c b/get_load.c
index 248d005..1439090 100644
--- a/get_load.c
+++ b/get_load.c
@@ -415,15 +415,15 @@ XtPointer call_data; /* pointer to (double) return value */
#if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
-void InitLoadPoint()
+void InitLoadPoint(void)
{
return;
}
-void GetLoadPoint( w, closure, call_data )
- Widget w; /* unused */
- XtPointer closure; /* unused */
- XtPointer call_data; /* pointer to (double) return value */
+void GetLoadPoint(
+ Widget w, /* unused */
+ XtPointer closure, /* unused */
+ XtPointer call_data) /* pointer to (double) return value */
{
static int fd = -1;
int n;
@@ -476,17 +476,17 @@ void GetLoadPoint( w, closure, call_data )
static processor_set_t default_set;
-void InitLoadPoint()
+void InitLoadPoint(void)
{
if (processor_set_default (mach_host_self (), &default_set) != KERN_SUCCESS)
xload_error("cannot get processor_set_default", "");
}
/* ARGSUSED */
-void GetLoadPoint( w, closure, call_data )
- Widget w; /* unused */
- XtPointer closure; /* unused */
- XtPointer call_data; /* pointer to (double) return value */
+void GetLoadPoint(
+ Widget w, /* unused */
+ XtPointer closure, /* unused */
+ XtPointer call_data) /* pointer to (double) return value */
{
host_t host;
struct processor_set_basic_info info;
@@ -514,16 +514,16 @@ void GetLoadPoint( w, closure, call_data )
static mach_port_t host_priv_port;
-void InitLoadPoint()
+void InitLoadPoint(void)
{
host_priv_port = mach_host_self();
}
/* ARGSUSED */
-void GetLoadPoint( w, closure, call_data )
- Widget w; /* unused */
- XtPointer closure; /* unused */
- XtPointer call_data; /* pointer to (double) return value */
+void GetLoadPoint(
+ Widget w, /* unused */
+ XtPointer closure, /* unused */
+ XtPointer call_data) /* pointer to (double) return value */
{
double *loadavg = (double *)call_data;
@@ -591,7 +591,7 @@ static int nto_idle_id;
static struct timespec nto_now, nto_last;
void
-InitLoadPoint()
+InitLoadPoint(void)
{
nto_idle_id = ClockId(1, 1); /* Idle thread */
ClockTime(nto_idle_id, NULL, &nto_idle_last);
@@ -600,10 +600,10 @@ InitLoadPoint()
/* ARGSUSED */
void
-GetLoadPoint( w, closure, call_data ) /* QNX NTO version */
-Widget w; /* unused */
-XtPointer closure; /* unused */
-XtPointer call_data; /* pointer to (double) return value */
+GetLoadPoint( /* QNX NTO version */
+ Widget w, /* unused */
+ XtPointer closure, /* unused */
+ XtPointer call_data) /* pointer to (double) return value */
{
double *loadavg = (double *)call_data;
double timediff;
@@ -633,7 +633,7 @@ static struct nlist nl[] = {
static kvm_t *kd;
static int fscale;
-void InitLoadPoint()
+void InitLoadPoint(void)
{
fixpt_t averunnable[3]; /* unused really */
@@ -654,10 +654,10 @@ void InitLoadPoint()
return;
}
-void GetLoadPoint(w, closure, call_data)
- Widget w; /* unused */
- XtPointer closure; /* unused */
- XtPointer call_data; /* ptr to (double) return value */
+void GetLoadPoint(
+ Widget w, /* unused */
+ XtPointer closure, /* unused */
+ XtPointer call_data) /* ptr to (double) return value */
{
double *loadavg = (double *)call_data;
fixpt_t t;
@@ -1138,8 +1138,7 @@ void GetLoadPoint( w, closure, call_data )
#endif /* KVM_ROUTINES else */
#endif /* SYSV && i386 else */
-void xload_error(str1, str2)
-char *str1, *str2;
+void xload_error(char *str1, char *str2)
{
(void) fprintf(stderr,"xload: %s %s\n", str1, str2);
#ifdef __bsdi__