Coverity fixes for xf86-input-evdev

Oliver McFadden oliver.mcfadden at nokia.com
Mon Apr 19 21:11:15 PDT 2010


Hi Peter,

Most of these fixes are quite minor and related to memory leaks from
xf86...StrOption. They fix all Coverity errors in evdev apart from one dead-code
error in EvdevUtilButtonEventToButtonNumber which I have intentionally left
unmodified (in case that code changes in the future.)

Event dead_error_condition: On this path, the condition "button > 32U" could not be true
2225 	    if (button > EVDEV_MAXBUTTONS)
Event dead_error_line: Cannot reach dead statement "return 0U;"
2226 		return 0;

 src/draglock.c |    2 ++
 src/emuWheel.c |    2 +-
 src/evdev.c    |   20 ++++++++++++--------
 3 files changed, 15 insertions(+), 9 deletions(-)

-- Oliver.


More information about the xorg-devel mailing list