diff mbox

[4/9] hid: fix misassignment

Message ID CAAu8pHuM7dx1x0txaGpN7139WOVCuq0u7z_BrUsvcoQJPP+=EA@mail.gmail.com
State New
Headers show

Commit Message

Blue Swirl Sept. 4, 2011, 3:49 p.m. UTC
The code does not have any effect as is, fix it.

Spotted by clang analyzer:
/src/qemu/hw/hid.c:99:13: warning: Value stored to 'x1' is never read
            x1 = 1;

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/hid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

     e->dz += z1;
diff mbox

Patch

From 15e3e8c915b6e89a0f9aad2dfec0a2e6c499fb0f Mon Sep 17 00:00:00 2001
Message-Id: <15e3e8c915b6e89a0f9aad2dfec0a2e6c499fb0f.1315150286.git.blauwirbel@gmail.com>
In-Reply-To: <70f99a25b7732d4c9ea54f74c089ccb9bb323ea6.1315150286.git.blauwirbel@gmail.com>
References: <70f99a25b7732d4c9ea54f74c089ccb9bb323ea6.1315150286.git.blauwirbel@gmail.com>
From: Blue Swirl <blauwirbel@gmail.com>
Date: Sun, 4 Sep 2011 10:59:52 +0000
Subject: [PATCH 4/9] hid: fix misassignment

The code does not have any effect as is, fix it.

Spotted by clang analyzer:
/src/qemu/hw/hid.c:99:13: warning: Value stored to 'x1' is never read
            x1 = 1;

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/hid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/hid.c b/hw/hid.c
index ec066cf..03761ab 100644
--- a/hw/hid.c
+++ b/hw/hid.c
@@ -96,7 +96,7 @@  static void hid_pointer_event_combine(HIDPointerEvent *e, int xyrel,
         /* Windows drivers do not like the 0/0 position and ignore such
          * events. */
         if (!(x1 | y1)) {
-            x1 = 1;
+            e->xdx = 1;
         }
     }
     e->dz += z1;
-- 
1.7.2.5