[PATCH 1/4] Fix a couple of compiler warnings
Dan Nicholson
dbn.lists at gmail.com
Sat May 8 10:11:06 PDT 2010
On Sat, May 8, 2010 at 9:47 AM, Keith Packard <keithp at keithp.com> wrote:
> On Sat, 8 May 2010 12:57:37 +0200, Julien Cristau <jcristau at debian.org> wrote:
>
>> Can we make the stuff in InputAttributes const instead?
>
> Yeah, that appears to mostly work. I can't figure out how to get this
> line to compile:
That works for config/udev. Not config/hal. Try building with
--disable-config-udev --enable-config-hal.
> attrs.tags = xstrtokenize(udev_device_get_property_value(udev_device, "ID_INPUT.tags"), ",");
>
> no matter how I decorate the declaration of 'tags' with 'const'. And, of
> course, freeing the tags will take a cast.
Because xstrtokenize splits the string and allocates the chunks. It's
not const and it gets freed at the end of the function.
--
Dan
More information about the xorg-devel
mailing list