Use (void) instead of () for functions without args

This commit is contained in:
eeemsi 2012-08-23 12:55:28 +02:00 committed by Michael Stapelberg
parent d29b62f24f
commit b9255f51f8
10 changed files with 44 additions and 44 deletions

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * 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. * 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 * kill()s the child-process (if any) and closes and
* free()s the stdin- and sigchild-watchers * free()s the stdin- and sigchild-watchers
* *
*/ */
void kill_child(); void kill_child(void);
/* /*
* Sends a SIGSTOP to the child-process (if existent) * 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) * Sends a SIGCONT to the child-process (if existent)
* *
*/ */
void cont_child(); void cont_child(void);
#endif #endif

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * ipc.c: Communicating with i3
* *
@ -23,7 +23,7 @@ int init_connection(const char *socket_path);
* Destroy the connection to i3. * Destroy the connection to i3.
* *
*/ */
void destroy_connection(); void destroy_connection(void);
/* /*
* Sends a Message to i3. * 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 * Subscribe to all the i3-events, we need
* *
*/ */
void subscribe_events(); void subscribe_events(void);
#endif #endif

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * outputs.c: Maintaining the output-list
* *
@ -29,7 +29,7 @@ void parse_outputs_json(char* json);
* Initiate the output-list * Initiate the output-list
* *
*/ */
void init_outputs(); void init_outputs(void);
/* /*
* Returns the output with the given name * Returns the output with the given name

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * workspaces.c: Maintaining the workspace-lists
* *
@ -28,7 +28,7 @@ void parse_workspaces_json(char *json);
* free() all workspace data-structures * free() all workspace data-structures
* *
*/ */
void free_workspaces(); void free_workspaces(void);
struct i3_ws { struct i3_ws {
int num; /* The internal number of the ws */ int num; /* The internal number of the ws */

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * 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. * 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 * 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 * 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 * Reallocate the statusline-buffer
* *
*/ */
void realloc_sl_buffer(); void realloc_sl_buffer(void);
/* /*
* Reconfigure all bars and create new for newly activated outputs * Reconfigure all bars and create new for newly activated outputs
* *
*/ */
void reconfig_windows(); void reconfig_windows(void);
/* /*
* Render the bars, with buttons and statusline * 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 * Redraw the bars, i.e. simply copy the buffer to the barwindow
* *
*/ */
void redraw_bars(); void redraw_bars(void);
#endif #endif

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * child.c: Getting Input for the statusline
* *
@ -56,7 +56,7 @@ char *statusline_buffer = NULL;
* Stop and free() the stdin- and sigchild-watchers * Stop and free() the stdin- and sigchild-watchers
* *
*/ */
void cleanup() { void cleanup(void) {
if (stdin_io != NULL) { if (stdin_io != NULL) {
ev_io_stop(main_loop, stdin_io); ev_io_stop(main_loop, stdin_io);
FREE(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. * 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) { if (child_pid != 0) {
kill(child_pid, SIGCONT); kill(child_pid, SIGCONT);
kill(child_pid, SIGTERM); kill(child_pid, SIGTERM);
@ -339,7 +339,7 @@ void kill_child_at_exit() {
* free()s the stdin- and sigchild-watchers * free()s the stdin- and sigchild-watchers
* *
*/ */
void kill_child() { void kill_child(void) {
if (child_pid != 0) { if (child_pid != 0) {
kill(child_pid, SIGCONT); kill(child_pid, SIGCONT);
kill(child_pid, SIGTERM); kill(child_pid, SIGTERM);
@ -354,7 +354,7 @@ void kill_child() {
* Sends a SIGSTOP to the child-process (if existent) * Sends a SIGSTOP to the child-process (if existent)
* *
*/ */
void stop_child() { void stop_child(void) {
if (child_pid != 0) { if (child_pid != 0) {
kill(child_pid, SIGSTOP); kill(child_pid, SIGSTOP);
} }
@ -364,7 +364,7 @@ void stop_child() {
* Sends a SIGCONT to the child-process (if existent) * Sends a SIGCONT to the child-process (if existent)
* *
*/ */
void cont_child() { void cont_child(void) {
if (child_pid != 0) { if (child_pid != 0) {
kill(child_pid, SIGCONT); kill(child_pid, SIGCONT);
} }

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * ipc.c: Communicating with i3
* *
@ -286,7 +286,7 @@ int init_connection(const char *socket_path) {
/* /*
* Destroy the connection to i3. * Destroy the connection to i3.
*/ */
void destroy_connection() { void destroy_connection(void) {
close(i3_connection->fd); close(i3_connection->fd);
ev_io_stop(main_loop, i3_connection); ev_io_stop(main_loop, i3_connection);
} }
@ -295,7 +295,7 @@ void destroy_connection() {
* Subscribe to all the i3-events, we need * Subscribe to all the i3-events, we need
* *
*/ */
void subscribe_events() { void subscribe_events(void) {
if (config.disable_ws) { if (config.disable_ws) {
i3_send_msg(I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[ \"output\" ]"); i3_send_msg(I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[ \"output\" ]");
} else { } else {

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * outputs.c: Maintaining the output-list
* *
@ -266,7 +266,7 @@ yajl_callbacks outputs_callbacks = {
* Initiate the output-list * Initiate the output-list
* *
*/ */
void init_outputs() { void init_outputs(void) {
outputs = smalloc(sizeof(struct outputs_head)); outputs = smalloc(sizeof(struct outputs_head));
SLIST_INIT(outputs); SLIST_INIT(outputs);
} }

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * 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. * free() all workspace data-structures. Does not free() the heads of the tailqueues.
* *
*/ */
void free_workspaces() { void free_workspaces(void) {
i3_output *outputs_walk; i3_output *outputs_walk;
if (outputs == NULL) { if (outputs == NULL) {
return; return;

View File

@ -2,7 +2,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3bar - an xcb-based status- and ws-bar for i3 * 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 * 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 * Redraws the statusline to the buffer
* *
*/ */
void refresh_statusline() { void refresh_statusline(void) {
struct status_block *block; struct status_block *block;
uint32_t old_statusline_width = statusline_width; uint32_t old_statusline_width = statusline_width;
@ -161,7 +161,7 @@ void refresh_statusline() {
* Hides all bars (unmaps them) * Hides all bars (unmaps them)
* *
*/ */
void hide_bars() { void hide_bars(void) {
if (!config.hide_on_modifier) { if (!config.hide_on_modifier) {
return; return;
} }
@ -180,7 +180,7 @@ void hide_bars() {
* Unhides all bars (maps them) * Unhides all bars (maps them)
* *
*/ */
void unhide_bars() { void unhide_bars(void) {
if (!config.hide_on_modifier) { if (!config.hide_on_modifier) {
return; return;
} }
@ -353,7 +353,7 @@ void handle_button(xcb_button_press_event_t *event) {
* new tray client or removing an old one. * new tray client or removing an old one.
* *
*/ */
static void configure_trayclients() { static void configure_trayclients(void) {
trayclient *trayclient; trayclient *trayclient;
i3_output *output; i3_output *output;
SLIST_FOREACH(output, outputs, slist) { 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. * atom. Afterwards, tray clients will send ClientMessages to our window.
* *
*/ */
void init_tray() { void init_tray(void) {
DLOG("Initializing system tray functionality\n"); DLOG("Initializing system tray functionality\n");
/* request the tray manager atom for the X11 display we are running on */ /* request the tray manager atom for the X11 display we are running on */
char atomname[strlen("_NET_SYSTEM_TRAY_S") + 11]; char atomname[strlen("_NET_SYSTEM_TRAY_S") + 11];
@ -1055,7 +1055,7 @@ void init_tray() {
* Called once, before the program terminates. * Called once, before the program terminates.
* *
*/ */
void clean_xcb() { void clean_xcb(void) {
i3_output *o_walk; i3_output *o_walk;
free_workspaces(); free_workspaces();
SLIST_FOREACH(o_walk, outputs, slist) { 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 * 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; xcb_intern_atom_reply_t *reply;
#define ATOM_DO(name) reply = xcb_intern_atom_reply(xcb_connection, atom_cookies[name], NULL); \ #define ATOM_DO(name) reply = xcb_intern_atom_reply(xcb_connection, atom_cookies[name], NULL); \
if (reply == NULL) { \ if (reply == NULL) { \
@ -1145,7 +1145,7 @@ void destroy_window(i3_output *output) {
* Reallocate the statusline-buffer * 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", DLOG("Re-allocating statusline-buffer, statusline_width = %d, root_screen->width_in_pixels = %d\n",
statusline_width, root_screen->width_in_pixels); statusline_width, root_screen->width_in_pixels);
xcb_free_pixmap(xcb_connection, statusline_pm); 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 * Reconfigure all bars and create new bars for recently activated outputs
* *
*/ */
void reconfig_windows() { void reconfig_windows(void) {
uint32_t mask; uint32_t mask;
uint32_t values[5]; uint32_t values[5];
static bool tray_configured = false; static bool tray_configured = false;
@ -1398,7 +1398,7 @@ void reconfig_windows() {
* Render the bars, with buttons and statusline * Render the bars, with buttons and statusline
* *
*/ */
void draw_bars() { void draw_bars(void) {
DLOG("Drawing Bars...\n"); DLOG("Drawing Bars...\n");
int i = 0; int i = 0;
@ -1537,7 +1537,7 @@ void draw_bars() {
* Redraw the bars, i.e. simply copy the buffer to the barwindow * Redraw the bars, i.e. simply copy the buffer to the barwindow
* *
*/ */
void redraw_bars() { void redraw_bars(void) {
i3_output *outputs_walk; i3_output *outputs_walk;
SLIST_FOREACH(outputs_walk, outputs, slist) { SLIST_FOREACH(outputs_walk, outputs, slist) {
if (!outputs_walk->active) { if (!outputs_walk->active) {