Package: g15daemon / 1.9.5.3-12

08-remove-unused-variables.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Description: Remove unused variables
 Global variable keyhandler is declared as pointer to incomplete struct type.
 Upon closer inspection, it turned out that this variable and
 client_handles_keys are unused.
Author: Alexander Ponyatykh <lazyranma@gmail.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688465
Last-Update: 2019-11-18
===================================================================
--- a/g15daemon/linked_lists.c
+++ b/g15daemon/linked_lists.c
@@ -30,8 +30,6 @@
 #include <g15daemon.h>
 #include <libg15.h>
 
-extern lcd_t *keyhandler;
-extern unsigned int client_handles_keys;
 extern plugin_info_t *generic_info;
 
 lcd_t static * ll_create_lcd () {
@@ -175,12 +173,6 @@
         (*masterlist)->current->lcd->state_changed = 1;
     }
     
-    if(&oldnode->lcd == (void*)keyhandler) {
-        client_handles_keys = 0;
-        keyhandler = NULL;
-        g15daemon_log(LOG_WARNING,"Client key handler quit, going back to defaults");
-    }
-    
     if((*masterlist)->head!=oldnode){
         (*next)->prev = oldnode->prev;
         (*prev)->next = oldnode->next;
--- a/g15daemon/main.c
+++ b/g15daemon/main.c
@@ -53,9 +53,7 @@
 int keyboard_backlight_off_onexit = 0;
 unsigned int g15daemon_debug = 0;
 unsigned int cycle_key;
-unsigned int client_handles_keys = 0;
 static unsigned int set_backlight = 0;
-struct lcd_t *keyhandler = NULL;
 
 static int loaded_plugins = 0;