[PATCH 2/2 xload] Fix old-style function definitions on Cygwin
Alan Coopersmith
alan.coopersmith at oracle.com
Mon Oct 4 23:09:27 PDT 2010
Yaakov (Cygwin/X) wrote:
> From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
>
> get_load.c: In function ‘InitLoadPoint’:
> get_load.c:74:6: warning: old-style function definition
> get_load.c: In function ‘GetLoadPoint’:
> get_load.c:92:6: warning: old-style function definition
>
> Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
> ---
> get_load.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/get_load.c b/get_load.c
> index 551a7a8..4ba5e0c 100644
> --- a/get_load.c
> +++ b/get_load.c
> @@ -71,7 +71,7 @@ static long (__stdcall *pdhaddcounter)(HANDLE, LPCSTR, DWORD, HANDLE*);
> static long (__stdcall *pdhcollectquerydata)(HANDLE);
> static long (__stdcall *pdhgetformattedcountervalue)(HANDLE, DWORD, LPDWORD, COUNTER*);
> #define CYGWIN_PERF
> -void InitLoadPoint()
> +void InitLoadPoint(void)
> {
> long ret;
> hdll=LoadLibrary("pdh.dll");
> @@ -89,10 +89,10 @@ void InitLoadPoint()
> ret = pdhaddcounter(query, "\\Processor(_Total)\\% Processor Time", 0, &counter);
> if (ret!=0) exit(-1);
> }
> -void GetLoadPoint( w, closure, call_data ) /* SYSV386 version */
> - 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;
> COUNTER fmtvalue;
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
(Patch 1 looks reasonable to me, but I have no idea what WIN32_LEAN_AND_MEAN is
or if it's appropriate, so hopefully someone who does will review it.)
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list