From: eeemsi Date: Thu, 23 Aug 2012 10:55:28 +0000 (+0200) Subject: Use (void) instead of () for functions without args X-Git-Tag: 4.3~60 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b9255f51f8ee9eb8a028394cf429c25c410298ef;p=i3%2Fi3 Use (void) instead of () for functions without args --- diff --git a/i3bar/include/child.h b/i3bar/include/child.h index 24c7e460..c0b56a01 100644 --- a/i3bar/include/child.h +++ b/i3bar/include/child.h @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * child.c: Getting Input for the statusline * @@ -24,25 +24,25 @@ void start_child(char *command); * kill()s the child-process (if any). Called when exit()ing. * */ -void kill_child_at_exit(); +void kill_child_at_exit(void); /* * kill()s the child-process (if any) and closes and * free()s the stdin- and sigchild-watchers * */ -void kill_child(); +void kill_child(void); /* * Sends a SIGSTOP to the child-process (if existent) * */ -void stop_child(); +void stop_child(void); /* * Sends a SIGCONT to the child-process (if existent) * */ -void cont_child(); +void cont_child(void); #endif diff --git a/i3bar/include/ipc.h b/i3bar/include/ipc.h index a0c49704..f20d45f0 100644 --- a/i3bar/include/ipc.h +++ b/i3bar/include/ipc.h @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * ipc.c: Communicating with i3 * @@ -23,7 +23,7 @@ int init_connection(const char *socket_path); * Destroy the connection to i3. * */ -void destroy_connection(); +void destroy_connection(void); /* * Sends a Message to i3. @@ -36,6 +36,6 @@ int i3_send_msg(uint32_t type, const char* payload); * Subscribe to all the i3-events, we need * */ -void subscribe_events(); +void subscribe_events(void); #endif diff --git a/i3bar/include/outputs.h b/i3bar/include/outputs.h index f9ddd54b..ad249786 100644 --- a/i3bar/include/outputs.h +++ b/i3bar/include/outputs.h @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * outputs.c: Maintaining the output-list * @@ -29,7 +29,7 @@ void parse_outputs_json(char* json); * Initiate the output-list * */ -void init_outputs(); +void init_outputs(void); /* * Returns the output with the given name diff --git a/i3bar/include/workspaces.h b/i3bar/include/workspaces.h index 1c77b0b3..5fe1ba1e 100644 --- a/i3bar/include/workspaces.h +++ b/i3bar/include/workspaces.h @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * workspaces.c: Maintaining the workspace-lists * @@ -28,7 +28,7 @@ void parse_workspaces_json(char *json); * free() all workspace data-structures * */ -void free_workspaces(); +void free_workspaces(void); struct i3_ws { int num; /* The internal number of the ws */ diff --git a/i3bar/include/xcb.h b/i3bar/include/xcb.h index 9ed21496..6c7bc567 100644 --- a/i3bar/include/xcb.h +++ b/i3bar/include/xcb.h @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * xcb.c: Communicating with X * @@ -69,13 +69,13 @@ void init_colors(const struct xcb_color_strings_t *colors); * Called once, before the program terminates. * */ -void clean_xcb(); +void clean_xcb(void); /* * Get the earlier requested atoms and save them in the prepared data-structure * */ -void get_atoms(); +void get_atoms(void); /* * Reparents all tray clients of the specified output to the root window. This @@ -98,24 +98,24 @@ void destroy_window(i3_output *output); * Reallocate the statusline-buffer * */ -void realloc_sl_buffer(); +void realloc_sl_buffer(void); /* * Reconfigure all bars and create new for newly activated outputs * */ -void reconfig_windows(); +void reconfig_windows(void); /* * Render the bars, with buttons and statusline * */ -void draw_bars(); +void draw_bars(void); /* * Redraw the bars, i.e. simply copy the buffer to the barwindow * */ -void redraw_bars(); +void redraw_bars(void); #endif diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 5cbae6a5..a5f49aa3 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * child.c: Getting Input for the statusline * @@ -56,7 +56,7 @@ char *statusline_buffer = NULL; * Stop and free() the stdin- and sigchild-watchers * */ -void cleanup() { +void cleanup(void) { if (stdin_io != NULL) { ev_io_stop(main_loop, stdin_io); FREE(stdin_io); @@ -327,7 +327,7 @@ void start_child(char *command) { * kill()s the child-process (if any). Called when exit()ing. * */ -void kill_child_at_exit() { +void kill_child_at_exit(void) { if (child_pid != 0) { kill(child_pid, SIGCONT); kill(child_pid, SIGTERM); @@ -339,7 +339,7 @@ void kill_child_at_exit() { * free()s the stdin- and sigchild-watchers * */ -void kill_child() { +void kill_child(void) { if (child_pid != 0) { kill(child_pid, SIGCONT); kill(child_pid, SIGTERM); @@ -354,7 +354,7 @@ void kill_child() { * Sends a SIGSTOP to the child-process (if existent) * */ -void stop_child() { +void stop_child(void) { if (child_pid != 0) { kill(child_pid, SIGSTOP); } @@ -364,7 +364,7 @@ void stop_child() { * Sends a SIGCONT to the child-process (if existent) * */ -void cont_child() { +void cont_child(void) { if (child_pid != 0) { kill(child_pid, SIGCONT); } diff --git a/i3bar/src/ipc.c b/i3bar/src/ipc.c index 41b8e151..2cc80cf7 100644 --- a/i3bar/src/ipc.c +++ b/i3bar/src/ipc.c @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * ipc.c: Communicating with i3 * @@ -286,7 +286,7 @@ int init_connection(const char *socket_path) { /* * Destroy the connection to i3. */ -void destroy_connection() { +void destroy_connection(void) { close(i3_connection->fd); ev_io_stop(main_loop, i3_connection); } @@ -295,7 +295,7 @@ void destroy_connection() { * Subscribe to all the i3-events, we need * */ -void subscribe_events() { +void subscribe_events(void) { if (config.disable_ws) { i3_send_msg(I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[ \"output\" ]"); } else { diff --git a/i3bar/src/outputs.c b/i3bar/src/outputs.c index eabf4d7b..db986702 100644 --- a/i3bar/src/outputs.c +++ b/i3bar/src/outputs.c @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * outputs.c: Maintaining the output-list * @@ -266,7 +266,7 @@ yajl_callbacks outputs_callbacks = { * Initiate the output-list * */ -void init_outputs() { +void init_outputs(void) { outputs = smalloc(sizeof(struct outputs_head)); SLIST_INIT(outputs); } diff --git a/i3bar/src/workspaces.c b/i3bar/src/workspaces.c index 6db37983..5e01b98d 100644 --- a/i3bar/src/workspaces.c +++ b/i3bar/src/workspaces.c @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * workspaces.c: Maintaining the workspace-lists * @@ -262,7 +262,7 @@ void parse_workspaces_json(char *json) { * free() all workspace data-structures. Does not free() the heads of the tailqueues. * */ -void free_workspaces() { +void free_workspaces(void) { i3_output *outputs_walk; if (outputs == NULL) { return; diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 1d6a4d2b..861925b9 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3bar - an xcb-based status- and ws-bar for i3 - * © 2010-2011 Axel Wagner and contributors (see also: LICENSE) + * © 2010-2012 Axel Wagner and contributors (see also: LICENSE) * * xcb.c: Communicating with X * @@ -108,7 +108,7 @@ int _xcb_request_failed(xcb_void_cookie_t cookie, char *err_msg, int line) { * Redraws the statusline to the buffer * */ -void refresh_statusline() { +void refresh_statusline(void) { struct status_block *block; uint32_t old_statusline_width = statusline_width; @@ -161,7 +161,7 @@ void refresh_statusline() { * Hides all bars (unmaps them) * */ -void hide_bars() { +void hide_bars(void) { if (!config.hide_on_modifier) { return; } @@ -180,7 +180,7 @@ void hide_bars() { * Unhides all bars (maps them) * */ -void unhide_bars() { +void unhide_bars(void) { if (!config.hide_on_modifier) { return; } @@ -353,7 +353,7 @@ void handle_button(xcb_button_press_event_t *event) { * new tray client or removing an old one. * */ -static void configure_trayclients() { +static void configure_trayclients(void) { trayclient *trayclient; i3_output *output; SLIST_FOREACH(output, outputs, slist) { @@ -966,7 +966,7 @@ void init_xcb_late(char *fontname) { * atom. Afterwards, tray clients will send ClientMessages to our window. * */ -void init_tray() { +void init_tray(void) { DLOG("Initializing system tray functionality\n"); /* request the tray manager atom for the X11 display we are running on */ char atomname[strlen("_NET_SYSTEM_TRAY_S") + 11]; @@ -1055,7 +1055,7 @@ void init_tray() { * Called once, before the program terminates. * */ -void clean_xcb() { +void clean_xcb(void) { i3_output *o_walk; free_workspaces(); SLIST_FOREACH(o_walk, outputs, slist) { @@ -1083,7 +1083,7 @@ void clean_xcb() { * Get the earlier requested atoms and save them in the prepared data structure * */ -void get_atoms() { +void get_atoms(void) { xcb_intern_atom_reply_t *reply; #define ATOM_DO(name) reply = xcb_intern_atom_reply(xcb_connection, atom_cookies[name], NULL); \ if (reply == NULL) { \ @@ -1145,7 +1145,7 @@ void destroy_window(i3_output *output) { * Reallocate the statusline-buffer * */ -void realloc_sl_buffer() { +void realloc_sl_buffer(void) { DLOG("Re-allocating statusline-buffer, statusline_width = %d, root_screen->width_in_pixels = %d\n", statusline_width, root_screen->width_in_pixels); xcb_free_pixmap(xcb_connection, statusline_pm); @@ -1189,7 +1189,7 @@ void realloc_sl_buffer() { * Reconfigure all bars and create new bars for recently activated outputs * */ -void reconfig_windows() { +void reconfig_windows(void) { uint32_t mask; uint32_t values[5]; static bool tray_configured = false; @@ -1398,7 +1398,7 @@ void reconfig_windows() { * Render the bars, with buttons and statusline * */ -void draw_bars() { +void draw_bars(void) { DLOG("Drawing Bars...\n"); int i = 0; @@ -1537,7 +1537,7 @@ void draw_bars() { * Redraw the bars, i.e. simply copy the buffer to the barwindow * */ -void redraw_bars() { +void redraw_bars(void) { i3_output *outputs_walk; SLIST_FOREACH(outputs_walk, outputs, slist) { if (!outputs_walk->active) {