[PATCH 1/4] Fix a couple of compiler warnings

Julien Cristau jcristau at debian.org
Sat May 8 13:51:57 PDT 2010


On Sat, May  8, 2010 at 09:06:26 -0700, Dan Nicholson wrote:

> > Can we make the stuff in InputAttributes const instead?
> 
> No, because the strings from hal are not const. I have a patch to make
> config/udev dup the strings because:
> 
> 1. udevd might die
> 2. the device might get immediately removed
> 
> In either case, you're holding a pointer into udev's database that
> might go away at any time. Doesn't seem like a situation we'd want to
> be in.
> 
I'm holding a pointer to a string that libudev gave me, and that's
hanging off an udev_device that I'm holding a reference on, until after
NIDR returns.  I'm not sure how that string could go away?

Cheers,
Julien


More information about the xorg-devel mailing list