Unreachable code
Closed this issue · 3 comments
maddin200 commented
[/src/UbuntuToolkit/mousetouchadaptor_x11.cpp line 216
Code:
case XI_Motion:
return handleMotionNotify(
static_cast<WId>(xiDeviceEvent->event),
xiDeviceEvent->mods.base_mods,
fixed1616ToReal(xiDeviceEvent->event_x),
fixed1616ToReal(xiDeviceEvent->event_y));
return true; // <-- unreachable
default:
return false;
cibersheep commented
Asking from ignorance here: if the first return
is invalid, would always return something (null, error, else) or would fall into the second return
?
maddin200 commented
return will always terminate the function so the second value (true) will be not reached.
cibersheep commented
I see. Thank you