Code review comment for lp:~mc-return/compiz/compiz.merge-fix1101549-and-fix1101561-missing-break

Revision history for this message
MC Return (mc-return) wrote :

> 4 @@ -964,9 +964,12 @@
> 5 switch (event->type) {
> 6 case MotionNotify:
> 7 handleMotionEvent (pointerX, pointerY);
> 8 + break;
> 9 case EnterNotify:
> 10 + break;
> 11 case LeaveNotify:
> 12 handleMotionEvent (pointerX, pointerY);
> 13 + break;
> 14 default:
>
> Ouch, an intended fall through caught by coverity as a false positive. I knew
> this would eventually happen.
>
> Unfortunately this is currently broken (in a very small way). pointerX and
> pointerY are updated on enter leave and motion events however this code only
> handles the change on motion and leave.
>
> I think coverity won't complain if you do this:
>
> case EnterNotify:
> case LeaveNotify:
> case MotionNotify:
> handleMotionEvent (pointerX, pointerY);
> break;

Should it fall through to default as well or not ?
If not (which was the case previously) the last break
below handleMotionEvent (pointerX, pointerY); should
also be removed...

review: Needs Information

« Back to merge proposal