On Wed, Mar 17, 2010 at 09:13:40PM +0000, Przemo Firszt wrote:
> Hi,
> Attached patch adds definition of 'priv' variable to wcmDevReadInput in
> xf86Wacom.c . The definition was missing and it was breaking build with
> --enable-debug option, but it wasn't afecting normal builds.
>
> kind regards,
> Przemo
>
> From e3508eab6960b4b884e79f616791843d3a21d305 Mon Sep 17 00:00:00 2001
> From: Przemo Firszt <[email protected]>
> Date: Wed, 17 Mar 2010 21:03:56 +0000
> Subject: [PATCH] Add definition of 'priv' variable in wcmDevReadInput
>
> The definition was missing and it was breaking build with --enable-debug
> option.
>
> Signed-off-by: Przemo Firszt <[email protected]>
> ---
> src/xf86Wacom.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> index 1f61503..85cb38b 100644
> --- a/src/xf86Wacom.c
> +++ b/src/xf86Wacom.c
> @@ -1076,6 +1076,9 @@ static int wcmReady(LocalDevicePtr local)
>
> static void wcmDevReadInput(LocalDevicePtr local)
> {
> +#ifdef DEBUG
> + WacomDevicePtr priv = (WacomDevicePtr)local->private;
> +#endif
> int loop=0;
> #define MAX_READ_LOOPS 10
>
> --
> 1.7.0.1
oops, good catch, thank you. I looked at that piece of code and with a bit
of reshuffling we can avoid an ifdef minefield. How about the attached
patch instead?
Cheers,
Peter
>From 28e58d1bbdaa9cfbeca5d91f55dbc3496e0ed20d Mon Sep 17 00:00:00 2001
From: Peter Hutterer <[email protected]>
Date: Thu, 18 Mar 2010 10:08:20 +1000
Subject: [PATCH] Fix build error with --enable-debug on.
To reduce the number of ifdefs, a slight reshuffling of the code.
Signed-off-by: Peter Hutterer <[email protected]>
---
src/xf86Wacom.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 1f61503..5572950 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -1089,12 +1089,19 @@ static void wcmDevReadInput(LocalDevicePtr local)
wcmReadPacket(local);
}
+#ifdef DEBUG
/* report how well we're doing */
- if (loop >= MAX_READ_LOOPS)
- DBG(1, priv, "Can't keep up!!!\n");
- else if (loop > 0)
- DBG(10, priv, "Read (%d)\n",loop);
-}
+ if (loop > 0)
+ {
+ WacomDevicePtr priv = (WacomDevicePtr)local->private;
+
+ if (loop >= MAX_READ_LOOPS)
+ DBG(1, priv, "Can't keep up!!!\n");
+ else
+ DBG(10, priv, "Read (%d)\n",loop);
+ }
+#endif
+}
void wcmReadPacket(LocalDevicePtr local)
{
--
1.6.6.1
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel