diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-03-16 18:44:12 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-28 04:19:17 -0200 |
commit | 0436471fd8007826d40a2f57710e9964c0768d50 (patch) | |
tree | 55c9523445967d19599582e062e7b5ad4c6121d4 | |
parent | b91f8e903b1004a35dfe01204852c628367475b7 (diff) |
Compile warning fixes.
Ansify some functions with K&R definitions.
-rw-r--r-- | get_load.c | 53 | ||||
-rw-r--r-- | get_rload.c | 17 | ||||
-rw-r--r-- | xload.c | 13 |
3 files changed, 37 insertions, 46 deletions
@@ -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__ diff --git a/get_rload.c b/get_rload.c index 9629d01..0c4cc61 100644 --- a/get_rload.c +++ b/get_rload.c @@ -15,10 +15,10 @@ #endif #ifdef RLOADSTUB -void GetRLoadPoint( w, closure, call_data ) - Widget w; /* unused */ - XtPointer closure; /* unused */ - XtPointer call_data; /* pointer to (double) return value */ +void GetRLoadPoint( + Widget w, /* unused */ + XtPointer closure, /* unused */ + XtPointer call_data) /* pointer to (double) return value */ { *(double *)call_data = 1.0; @@ -40,11 +40,10 @@ extern XLoadResources resources ; #define WHDRSIZE ((int)(sizeof (buf) - sizeof (buf.wd_we))) -void GetRLoadPoint( w, closure, call_data ) - Widget w; /* unused */ - XtPointer closure; /* unused */ - XtPointer call_data; /* pointer to (double) return value */ - +void GetRLoadPoint( + Widget w, /* unused */ + XtPointer closure, /* unused */ + XtPointer call_data) /* pointer to (double) return value */ { int f; static char *fname = NULL; @@ -270,8 +270,7 @@ main(int argc, char **argv) static unsigned long current_leds; static void -ClearLights (dpy) - Display *dpy; +ClearLights (Display *dpy) { XKeyboardControl cntrl; @@ -281,9 +280,7 @@ ClearLights (dpy) } static void -SetLights (data, timer) - XtPointer data; - XtIntervalId *timer; +SetLights (XtPointer data, XtIntervalId *timer) { Widget toplevel; Display *dpy; @@ -318,11 +315,7 @@ SetLights (data, timer) SetLights, data); } -static void quit (w, event, params, num_params) - Widget w; - XEvent *event; - String *params; - Cardinal *num_params; +static void quit (Widget w, XEvent *event, String *params, Cardinal *num_params) { if (event->type == ClientMessage && event->xclient.data.l[0] != wm_delete_window) { |