[PATCH] xfree86: initialize InputAttributes to NULL in the autoconfig code.

Peter Hutterer peter.hutterer at who-t.net
Thu May 27 07:34:29 PDT 2010


Fixes warnings
hw/xfree86/common/xf86Config.c:1272: warning: ‘Pointer$attrs’ may be
used uninitialized in this function
hw/xfree86/common/xf86Config.c:1119: note: ‘Pointer$attrs’ was declared here
hw/xfree86/common/xf86Config.c:1412: warning: ‘Keyboard$attrs’ may be
used uninitialized in this function
hw/xfree86/common/xf86Config.c:1119: note: ‘Keyboard$attrs’ was declared
here

Reported-by: Jamey Sharp <jamey at minilop.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Jamey, can you please give this a quick compile-test, it should be the right
patch but my box is rather hideously broken at the moment.

 hw/xfree86/common/xf86Config.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a481368..7acb6af 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2330,6 +2330,7 @@ configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
     inputp->driver = conf_input->inp_driver;
     inputp->commonOptions = conf_input->inp_option_lst;
     inputp->extraOptions = NULL;
+    inputp->attrs = NULL;
 
     return TRUE;
 }
-- 
1.6.5.2



More information about the xorg-devel mailing list