[PATCH synaptics] Constify priv->device

Chase Douglas chase.douglas at canonical.com
Wed Jan 4 15:54:30 PST 2012


On 01/04/2012 02:40 PM, Peter Hutterer wrote:
> On Wed, Jan 04, 2012 at 08:41:25PM +0100, Mark Kettenis wrote:
>>> Date: Wed, 4 Jan 2012 19:01:31 +0000
>>> From: Daniel Stone
>>>
>>> Hi,
>>>
>>>> If Daniel Kurtz's analysis of the problem is right, and I believe it
>>>> is, then this diff is just as wrong as the previous diff from Peter.
>>>> It also means that the real culprit is Peter's change to constify
>>>> XIChangeDeviceProperty(). ??While Daniel Kurtz's suggestion to
>>>> introduce a cpointer typedef would work, I think it's better to drop
>>>> the pointer typedef entirely and simply use "const void *" in the
>>>> XIChangeDeviceProperty() prototype. ??We should probably deprecate the
>>>> pointer typedef; I bet the reason it was introduced was to support
>>>> pre-ANSI C, and I think we all agree that's irrelevant now.
>>>
>>> I never saw Daniel's analysis,
>>
>>    http://lists.x.org/archives/xorg-devel/2012-January/028243.html
>>
>>> but even if it's true, we'll need to fix it somehow for this ABI
>>> version anyway, and while the patch may not be excruciatingly
>>> correct per se, it's certainly safe for the usage.
>>
>> The change I'm suggesting won't affect the ABI in any way.
> 
> Isn't a change from 'void const *' to the intended 'const void *', which is
> what a XIChangeDeviceProperty() fix would comprise, technically ABI? not
> that it really matters in this case, imo.

It seems like ABI to me, but obviously we should fix it. The only change
will be that things go from compiling with warnings to compiling without
warnings.

The real question is whether we should add anything to evdev to supress
the warning. I say no, because it clutters up the code, it has no
effects after compilation, and it might give people a reason to update
their libXi :).

-- Chase


More information about the xorg-devel mailing list