From 7f2891aa487ecb6a1c5451b4c5b51316a1583ac6 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 30 Mar 2019 02:18:49 +0100 Subject: fm-desktop-icon-view: remove dead code Fixes Clang static analyzer warnings: fm-desktop-icon-view.c:331:33: warning: 1st function call argument is an uninitialized value if (pointer == NULL && (gdk_device_get_source (cur) == GDK_SOURCE_MOUSE)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fm-desktop-icon-view.c:335:34: warning: 1st function call argument is an uninitialized value if (keyboard == NULL && (gdk_device_get_source (cur) == GDK_SOURCE_KEYBOARD)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/file-manager/fm-desktop-icon-view.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 01060fe5..11f60aa8 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -319,7 +319,7 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *icon_container, FMDesktopIconView *desktop_icon_view) { XButtonEvent x_event; - GdkDevice *keyboard = NULL, *pointer = NULL, *cur; + GdkDevice *keyboard = NULL, *pointer = NULL; GdkSeat *seat; GdkDisplay *display; @@ -327,16 +327,6 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *icon_container, pointer = gdk_seat_get_pointer (seat); keyboard = gdk_seat_get_keyboard (seat); - { - if (pointer == NULL && (gdk_device_get_source (cur) == GDK_SOURCE_MOUSE)) { - pointer = cur; - } - - if (keyboard == NULL && (gdk_device_get_source (cur) == GDK_SOURCE_KEYBOARD)) { - keyboard = cur; - } - } - /* During a mouse click we have the pointer and keyboard grab. * We will send a fake event to the root window which will cause it * to try to get the grab so we need to let go ourselves. -- cgit v1.2.1