Possible bugs due to: warning: XXX may be used uninitialized in this function
Peter Hutterer
peter.hutterer at who-t.net
Sun Feb 1 19:00:05 PST 2009
On Mon, Feb 02, 2009 at 03:00:52AM +0100, Tomas Carnecky wrote:
> On 02/02/2009 02:35 AM, Tomas Carnecky wrote:
> > While trying to fix some of the warnings that gcc generates when
> > compiling the xserver, I came across two which appear to be real bugs.
> > Since they don't appear to be trivial to fix, I'm posting them here for
> > further review:
> >
> >
> > Xi/setbmap.c:110 in ProcXSetDeviceButtonMapping()
> > http://cgit.freedesktop.org/xorg/xserver/tree/Xi/setbmap.c#n110
> >
> > 'DeviceIntPtr dev' seems indeed uninitialized and is passed to
> > ApplyPointerMapping().
>
> commit bc909f71367a02297e725bb5769c2bcadab22395
> Author: Daniel Stone <daniel at fooishbar.org>
> Date: Tue Aug 12 00:35:56 2008 +0300
>
> You removed the code that initialized 'dev':
> - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
> - if (ret != Success)
> - return ret;
yep, looks like it. The patch below should restore it.
More information about the xorg
mailing list