Merge pull request #2644 from psychon/useless_int_return

property: Remove unused int return
This commit is contained in:
mergify[bot] 2019-02-12 15:57:31 +00:00 committed by GitHub
commit 5a7594a8cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 21 deletions

View File

@ -202,16 +202,16 @@ selection_getter_find_by_window(lua_State *L, xcb_window_t window)
return 0; return 0;
} }
int void
property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window) property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window)
{ {
lua_State *L = globalconf_get_lua_State(); lua_State *L = globalconf_get_lua_State();
if (state != XCB_PROPERTY_NEW_VALUE) if (state != XCB_PROPERTY_NEW_VALUE)
return 0; return;
if (selection_getter_find_by_window(L, window) == 0) if (selection_getter_find_by_window(L, window) == 0)
return 0; return;
selection_getter_t *selection = lua_touserdata(L, -1); selection_getter_t *selection = lua_touserdata(L, -1);
@ -236,7 +236,6 @@ property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window)
} }
lua_pop(L, 1); lua_pop(L, 1);
return 0;
} }
void void

View File

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

View File

@ -53,14 +53,13 @@
lua_pop(L, 1); \ lua_pop(L, 1); \
p_delete(&reply); \ p_delete(&reply); \
} \ } \
static int \ static void \
property_handle_##funcname(uint8_t state, \ property_handle_##funcname(uint8_t state, \
xcb_window_t window) \ xcb_window_t window) \
{ \ { \
client_t *c = client_getbywin(window); \ client_t *c = client_getbywin(window); \
if(c) \ if(c) \
property_update_##funcname(c, property_get_##funcname(c));\ property_update_##funcname(c, property_get_##funcname(c));\
return 0; \
} }
@ -74,14 +73,13 @@ HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role)
#undef HANDLE_TEXT_PROPERTY #undef HANDLE_TEXT_PROPERTY
#define HANDLE_PROPERTY(name) \ #define HANDLE_PROPERTY(name) \
static int \ static void \
property_handle_##name(uint8_t state, \ property_handle_##name(uint8_t state, \
xcb_window_t window) \ xcb_window_t window) \
{ \ { \
client_t *c = client_getbywin(window); \ client_t *c = client_getbywin(window); \
if(c) \ if(c) \
property_update_##name(c, property_get_##name(c));\ property_update_##name(c, property_get_##name(c));\
return 0; \
} }
HANDLE_PROPERTY(wm_protocols) HANDLE_PROPERTY(wm_protocols)
@ -251,7 +249,7 @@ property_update_wm_class(client_t *c, xcb_get_property_cookie_t cookie)
xcb_icccm_get_wm_class_reply_wipe(&hint); xcb_icccm_get_wm_class_reply_wipe(&hint);
} }
static int static void
property_handle_net_wm_strut_partial(uint8_t state, property_handle_net_wm_strut_partial(uint8_t state,
xcb_window_t window) xcb_window_t window)
{ {
@ -259,8 +257,6 @@ property_handle_net_wm_strut_partial(uint8_t state,
if(c) if(c)
ewmh_process_client_strut(c); ewmh_process_client_strut(c);
return 0;
} }
xcb_get_property_cookie_t xcb_get_property_cookie_t
@ -375,7 +371,7 @@ property_update_wm_protocols(client_t *c, xcb_get_property_cookie_t cookie)
* \param state currently unused * \param state currently unused
* \param window The window to obtain update the property with. * \param window The window to obtain update the property with.
*/ */
static int static void
property_handle_xembed_info(uint8_t state, property_handle_xembed_info(uint8_t state,
xcb_window_t window) xcb_window_t window)
{ {
@ -392,11 +388,9 @@ property_handle_xembed_info(uint8_t state,
globalconf.timestamp, propr); globalconf.timestamp, propr);
p_delete(&propr); p_delete(&propr);
} }
return 0;
} }
static int static void
property_handle_net_wm_opacity(uint8_t state, property_handle_net_wm_opacity(uint8_t state,
xcb_window_t window) xcb_window_t window)
{ {
@ -419,18 +413,15 @@ property_handle_net_wm_opacity(uint8_t state,
lua_pop(L, 1); lua_pop(L, 1);
} }
} }
return 0;
} }
static int static void
property_handle_xrootpmap_id(uint8_t state, property_handle_xrootpmap_id(uint8_t state,
xcb_window_t window) xcb_window_t window)
{ {
lua_State *L = globalconf_get_lua_State(); lua_State *L = globalconf_get_lua_State();
root_update_wallpaper(); root_update_wallpaper();
signal_object_emit(L, &global_signals, "wallpaper_changed", 0); signal_object_emit(L, &global_signals, "wallpaper_changed", 0);
return 0;
} }
/** The property notify event handler handling xproperties. /** The property notify event handler handling xproperties.
@ -481,7 +472,7 @@ property_handle_propertynotify_xproperty(xcb_property_notify_event_t *ev)
void void
property_handle_propertynotify(xcb_property_notify_event_t *ev) property_handle_propertynotify(xcb_property_notify_event_t *ev)
{ {
int (*handler)(uint8_t state, void (*handler)(uint8_t state,
xcb_window_t window) = NULL; xcb_window_t window) = NULL;
globalconf.timestamp = ev->time; globalconf.timestamp = ev->time;