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

Revision history for this message
Sam Spilsbury (smspillaz) 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;

review: Needs Fixing

« Back to merge proposal