Browse Source

property: Remove unused int return

Signed-off-by: Uli Schlachter <psychon@znc.in>
Uli Schlachter 11 months ago
parent
commit
d29cf0c926
3 changed files with 11 additions and 21 deletions
  1. 3
    4
      objects/selection_getter.c
  2. 1
    1
      objects/selection_getter.h
  3. 7
    16
      property.c

+ 3
- 4
objects/selection_getter.c View File

@@ -202,16 +202,16 @@ selection_getter_find_by_window(lua_State *L, xcb_window_t window)
202 202
     return 0;
203 203
 }
204 204
 
205
-int
205
+void
206 206
 property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window)
207 207
 {
208 208
     lua_State *L = globalconf_get_lua_State();
209 209
 
210 210
     if (state != XCB_PROPERTY_NEW_VALUE)
211
-        return 0;
211
+        return;
212 212
 
213 213
     if (selection_getter_find_by_window(L, window) == 0)
214
-        return 0;
214
+        return;
215 215
 
216 216
     selection_getter_t *selection = lua_touserdata(L, -1);
217 217
 
@@ -236,7 +236,6 @@ property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window)
236 236
     }
237 237
 
238 238
     lua_pop(L, 1);
239
-    return 0;
240 239
 }
241 240
 
242 241
 void

+ 1
- 1
objects/selection_getter.h View File

@@ -27,7 +27,7 @@
27 27
 
28 28
 void selection_getter_class_setup(lua_State*);
29 29
 void event_handle_selectionnotify(xcb_selection_notify_event_t*);
30
-int property_handle_awesome_selection_atom(uint8_t, xcb_window_t);
30
+void property_handle_awesome_selection_atom(uint8_t, xcb_window_t);
31 31
 
32 32
 #endif
33 33
 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

+ 7
- 16
property.c View File

@@ -53,14 +53,13 @@
53 53
         lua_pop(L, 1); \
54 54
         p_delete(&reply); \
55 55
     } \
56
-    static int \
56
+    static void \
57 57
     property_handle_##funcname(uint8_t state, \
58 58
                                xcb_window_t window) \
59 59
     { \
60 60
         client_t *c = client_getbywin(window); \
61 61
         if(c) \
62 62
             property_update_##funcname(c, property_get_##funcname(c));\
63
-        return 0; \
64 63
     }
65 64
 
66 65
 
@@ -74,14 +73,13 @@ HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role)
74 73
 #undef HANDLE_TEXT_PROPERTY
75 74
 
76 75
 #define HANDLE_PROPERTY(name) \
77
-    static int \
76
+    static void \
78 77
     property_handle_##name(uint8_t state, \
79 78
                            xcb_window_t window) \
80 79
     { \
81 80
         client_t *c = client_getbywin(window); \
82 81
         if(c) \
83 82
             property_update_##name(c, property_get_##name(c));\
84
-        return 0; \
85 83
     }
86 84
 
87 85
 HANDLE_PROPERTY(wm_protocols)
@@ -251,7 +249,7 @@ property_update_wm_class(client_t *c, xcb_get_property_cookie_t cookie)
251 249
     xcb_icccm_get_wm_class_reply_wipe(&hint);
252 250
 }
253 251
 
254
-static int
252
+static void
255 253
 property_handle_net_wm_strut_partial(uint8_t state,
256 254
                                      xcb_window_t window)
257 255
 {
@@ -259,8 +257,6 @@ property_handle_net_wm_strut_partial(uint8_t state,
259 257
 
260 258
     if(c)
261 259
         ewmh_process_client_strut(c);
262
-
263
-    return 0;
264 260
 }
265 261
 
266 262
 xcb_get_property_cookie_t
@@ -375,7 +371,7 @@ property_update_wm_protocols(client_t *c, xcb_get_property_cookie_t cookie)
375 371
  * \param state currently unused
376 372
  * \param window The window to obtain update the property with.
377 373
  */
378
-static int
374
+static void
379 375
 property_handle_xembed_info(uint8_t state,
380 376
                             xcb_window_t window)
381 377
 {
@@ -392,11 +388,9 @@ property_handle_xembed_info(uint8_t state,
392 388
                                globalconf.timestamp, propr);
393 389
         p_delete(&propr);
394 390
     }
395
-
396
-    return 0;
397 391
 }
398 392
 
399
-static int
393
+static void
400 394
 property_handle_net_wm_opacity(uint8_t state,
401 395
                                xcb_window_t window)
402 396
 {
@@ -419,18 +413,15 @@ property_handle_net_wm_opacity(uint8_t state,
419 413
             lua_pop(L, 1);
420 414
         }
421 415
     }
422
-
423
-    return 0;
424 416
 }
425 417
 
426
-static int
418
+static void
427 419
 property_handle_xrootpmap_id(uint8_t state,
428 420
                              xcb_window_t window)
429 421
 {
430 422
     lua_State *L = globalconf_get_lua_State();
431 423
     root_update_wallpaper();
432 424
     signal_object_emit(L, &global_signals, "wallpaper_changed", 0);
433
-    return 0;
434 425
 }
435 426
 
436 427
 /** The property notify event handler handling xproperties.
@@ -481,7 +472,7 @@ property_handle_propertynotify_xproperty(xcb_property_notify_event_t *ev)
481 472
 void
482 473
 property_handle_propertynotify(xcb_property_notify_event_t *ev)
483 474
 {
484
-    int (*handler)(uint8_t state,
475
+    void (*handler)(uint8_t state,
485 476
                    xcb_window_t window) = NULL;
486 477
 
487 478
     globalconf.timestamp = ev->time;

Loading…
Cancel
Save