Bug 15614 - dev uninitialized in xkbActions.c:XkbFilterDeviceBtn(...)
Summary: dev uninitialized in xkbActions.c:XkbFilterDeviceBtn(...)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Daniel Stone
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-19 19:49 UTC by Stefan Dirsch
Modified: 2008-04-21 21:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed fix: Is this how it should be? (377 bytes, patch)
2008-04-21 09:15 UTC, Egbert Eich
no flags Details | Splinter Review

Description Stefan Dirsch 2008-04-19 19:49:04 UTC
xkbActions.c:1043: warning: 'dev' is used uninitialized in this function

commit 320abd7d1d906807448fa01ad3377daf707f46cc
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Wed Dec 5 19:37:48 2007 +0000

    XKB: Actions: Don't run certain actions on the core keyboard

    Don't run VT switches, terminations, or anything, on the core keyboard:
    only run actions which affect the keyboard state.  If we get an action
    such as VT switch, just swallow the event.

[...]
@@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn(      XkbSrvInfoPtr   xkbi,
 DeviceIntPtr   dev;
 int            button;

+    if (dev == inputInfo.keyboard)
+        return 0;
+
     if (filter->keycode==0) {          /* initial press */
        dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL);
        if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))

This is obviously wrong.
Comment 1 Egbert Eich 2008-04-21 09:15:07 UTC
Created attachment 16078 [details] [review]
Proposed fix: Is this how it should be?
Comment 2 Peter Hutterer 2008-04-21 21:09:54 UTC
(In reply to comment #1)
> Created an attachment (id=16078) [details]
> Proposed fix: Is this how it should be?
> 

Thanks. Pushed as 449723510a1f9d024e23d9eb33795cac27f9443e


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.