summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-12-07 19:45:45 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-12-13 17:36:15 -0800
commit74406e5ea3378a9b633ad0776a4bb34347cf1911 (patch)
tree34ad931280c53856b9fde05b85fc2cb14b8c5a40
parentf388a2ff259ee1c1c6058762e900bb29550e8246 (diff)
Copy root field from wire event into root, not window, of Xlib event
Fixes cppcheck warning: [src/XScrnSaver.c:104] -> [src/XScrnSaver.c:105]: (performance, inconclusive) Variable 'window' is reassigned a value before the old one has been used if variable is no semaphore variable. Error seems to date back to revision 1.1 in X Consortium RCS, dated 1992-02-13, by "keith" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/XScrnSaver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XScrnSaver.c b/src/XScrnSaver.c
index 2a89246..3947dd5 100644
--- a/src/XScrnSaver.c
+++ b/src/XScrnSaver.c
@@ -102,7 +102,7 @@ static Bool wire_to_event (
se->send_event = (sevent->type & 0x80) != 0;
se->display = dpy;
se->window = sevent->window;
- se->window = sevent->root;
+ se->root = sevent->root;
se->state = sevent->state;
se->kind = sevent->kind;
se->forced = True;