Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792
The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4
.
This commit is contained in:
parent
d519659ea7
commit
206b96202c
|
@ -277,7 +277,7 @@ void load_configuration(xcb_connection_t *conn, const char *override_configfile,
|
||||||
* Translates keysymbols to keycodes for all bindings which use keysyms.
|
* Translates keysymbols to keycodes for all bindings which use keysyms.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void translate_keysyms();
|
void translate_keysyms(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ungrabs all keys, to be called before re-grabbing the keys because of a
|
* Ungrabs all keys, to be called before re-grabbing the keys because of a
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* and _NET_NUMBER_OF_DESKTOPS - 1.
|
* and _NET_NUMBER_OF_DESKTOPS - 1.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ewmh_update_current_desktop();
|
void ewmh_update_current_desktop(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates _NET_ACTIVE_WINDOW with the currently focused window.
|
* Updates _NET_ACTIVE_WINDOW with the currently focused window.
|
||||||
|
@ -44,6 +44,6 @@ void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows);
|
||||||
* Set up the EWMH hints on the root window.
|
* Set up the EWMH hints on the root window.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ewmh_setup_hints();
|
void ewmh_setup_hints(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,7 +43,7 @@ void handle_event(int type, xcb_generic_event_t *event);
|
||||||
* received from X11
|
* received from X11
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void property_handlers_init();
|
void property_handlers_init(void);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -78,7 +78,7 @@ void ipc_send_event(const char *event, uint32_t message_type, const char *payloa
|
||||||
* when exiting or restarting only!
|
* when exiting or restarting only!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ipc_shutdown();
|
void ipc_shutdown(void);
|
||||||
|
|
||||||
void dump_node(yajl_gen gen, Con *con, bool inplace_restart);
|
void dump_node(yajl_gen gen, Con *con, bool inplace_restart);
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ void set_font(i3Font *font);
|
||||||
* Frees the resources taken by the current font.
|
* Frees the resources taken by the current font.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void free_font();
|
void free_font(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the given string to UTF-8 from UCS-2 big endian. The return value
|
* Converts the given string to UTF-8 from UCS-2 big endian. The return value
|
||||||
|
|
|
@ -29,7 +29,7 @@ extern int shmlog_size;
|
||||||
* XDG_RUNTIME_DIR, see get_process_filename()).
|
* XDG_RUNTIME_DIR, see get_process_filename()).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void init_logging();
|
void init_logging(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables the given loglevel.
|
* Enables the given loglevel.
|
||||||
|
|
|
@ -27,7 +27,7 @@ void manage_existing_windows(xcb_window_t root);
|
||||||
* side-effects which are to be expected when continuing to run i3.
|
* side-effects which are to be expected when continuing to run i3.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void restore_geometry();
|
void restore_geometry(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do some sanity checks and then reparent the window.
|
* Do some sanity checks and then reparent the window.
|
||||||
|
|
|
@ -61,13 +61,13 @@ void init_ws_for_output(Output *output, Con *content);
|
||||||
* (Re-)queries the outputs via RandR and stores them in the list of outputs.
|
* (Re-)queries the outputs via RandR and stores them in the list of outputs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void randr_query_outputs();
|
void randr_query_outputs(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the first output which is active.
|
* Returns the first output which is active.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Output *get_first_output();
|
Output *get_first_output(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the output with the given name if it is active (!) or NULL.
|
* Returns the output with the given name if it is active (!) or NULL.
|
||||||
|
|
|
@ -16,6 +16,6 @@
|
||||||
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setup_signal_handler();
|
void setup_signal_handler(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,20 +42,20 @@ void tree_split(Con *con, orientation_t orientation);
|
||||||
* Moves focus one level up.
|
* Moves focus one level up.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void level_up();
|
void level_up(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves focus one level down.
|
* Moves focus one level down.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void level_down();
|
void level_down(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the tree, that is rendering all outputs using render_con() and
|
* Renders the tree, that is rendering all outputs using render_con() and
|
||||||
* pushing the changes to X11 using x_push_changes().
|
* pushing the changes to X11 using x_push_changes().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void tree_render();
|
void tree_render(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the current container using tree_close().
|
* Closes the current container using tree_close().
|
||||||
|
|
|
@ -69,31 +69,31 @@ void workspace_show_by_name(const char *num);
|
||||||
* Returns the next workspace.
|
* Returns the next workspace.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_next();
|
Con* workspace_next(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the previous workspace.
|
* Returns the previous workspace.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_prev();
|
Con* workspace_prev(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the next workspace on the same output
|
* Returns the next workspace on the same output
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_next_on_output();
|
Con* workspace_next_on_output(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the previous workspace on the same output
|
* Returns the previous workspace on the same output
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_prev_on_output();
|
Con* workspace_prev_on_output(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Focuses the previously focused workspace.
|
* Focuses the previously focused workspace.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void workspace_back_and_forth();
|
void workspace_back_and_forth(void);
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -108,7 +108,7 @@ void x_set_name(Con *con, const char *name);
|
||||||
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
|
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void x_set_i3_atoms();
|
void x_set_i3_atoms(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set warp_to coordinates. This will trigger on the next call to
|
* Set warp_to coordinates. This will trigger on the next call to
|
||||||
|
|
|
@ -20,7 +20,7 @@ enum xcursor_cursor_t {
|
||||||
XCURSOR_CURSOR_MAX
|
XCURSOR_CURSOR_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
void xcursor_load_cursors();
|
void xcursor_load_cursors(void);
|
||||||
Cursor xcursor_get_cursor(enum xcursor_cursor_t c);
|
Cursor xcursor_get_cursor(enum xcursor_cursor_t c);
|
||||||
int xcursor_get_xcb_cursor(enum xcursor_cursor_t c);
|
int xcursor_get_xcb_cursor(enum xcursor_cursor_t c);
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
* Xinerama information to setup workspaces for each screen.
|
* Xinerama information to setup workspaces for each screen.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void xinerama_init();
|
void xinerama_init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -87,7 +87,7 @@ void set_font(i3Font *font) {
|
||||||
* Frees the resources taken by the current font.
|
* Frees the resources taken by the current font.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void free_font() {
|
void free_font(void) {
|
||||||
/* Close the font and free the info */
|
/* Close the font and free the info */
|
||||||
xcb_close_font(conn, savedFont->id);
|
xcb_close_font(conn, savedFont->id);
|
||||||
if (savedFont->info)
|
if (savedFont->info)
|
||||||
|
|
|
@ -51,7 +51,7 @@ void yyerror(const char *error_message) {
|
||||||
ELOG("\n");
|
ELOG("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int yywrap() {
|
int yywrap(void) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ static void nagbar_cleanup(EV_P_ ev_cleanup *watcher, int revent) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void cmd_MIGRATION_start_nagbar() {
|
void cmd_MIGRATION_start_nagbar(void) {
|
||||||
if (migration_pid != -1) {
|
if (migration_pid != -1) {
|
||||||
fprintf(stderr, "i3-nagbar already running.\n");
|
fprintf(stderr, "i3-nagbar already running.\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -110,7 +110,7 @@ static char *get_string(const char *identifier) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_stack() {
|
static void clear_stack(void) {
|
||||||
DLOG("clearing stack.\n");
|
DLOG("clearing stack.\n");
|
||||||
for (int c = 0; c < 10; c++) {
|
for (int c = 0; c < 10; c++) {
|
||||||
if (stack[c].str != NULL)
|
if (stack[c].str != NULL)
|
||||||
|
|
|
@ -81,7 +81,7 @@ Binding *get_binding(uint16_t modifiers, xcb_keycode_t keycode) {
|
||||||
* Translates keysymbols to keycodes for all bindings which use keysyms.
|
* Translates keysymbols to keycodes for all bindings which use keysyms.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void translate_keysyms() {
|
void translate_keysyms(void) {
|
||||||
Binding *bind;
|
Binding *bind;
|
||||||
xcb_keysym_t keysym;
|
xcb_keysym_t keysym;
|
||||||
int col;
|
int col;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* and _NET_NUMBER_OF_DESKTOPS - 1.
|
* and _NET_NUMBER_OF_DESKTOPS - 1.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ewmh_update_current_desktop() {
|
void ewmh_update_current_desktop(void) {
|
||||||
Con *focused_ws = con_get_workspace(focused);
|
Con *focused_ws = con_get_workspace(focused);
|
||||||
Con *output;
|
Con *output;
|
||||||
uint32_t idx = 0;
|
uint32_t idx = 0;
|
||||||
|
@ -59,7 +59,7 @@ void ewmh_update_active_window(xcb_window_t window) {
|
||||||
* desktop applications to place desktop icons appropriately.
|
* desktop applications to place desktop icons appropriately.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ewmh_update_workarea() {
|
void ewmh_update_workarea(void) {
|
||||||
int num_workspaces = 0, count = 0;
|
int num_workspaces = 0, count = 0;
|
||||||
Rect last_rect = {0, 0, 0, 0};
|
Rect last_rect = {0, 0, 0, 0};
|
||||||
Con *output;
|
Con *output;
|
||||||
|
@ -131,7 +131,7 @@ void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows) {
|
||||||
* Set up the EWMH hints on the root window.
|
* Set up the EWMH hints on the root window.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ewmh_setup_hints() {
|
void ewmh_setup_hints(void) {
|
||||||
xcb_atom_t supported_atoms[] = {
|
xcb_atom_t supported_atoms[] = {
|
||||||
#define xmacro(atom) A_ ## atom,
|
#define xmacro(atom) A_ ## atom,
|
||||||
#include "atoms.xmacro"
|
#include "atoms.xmacro"
|
||||||
|
|
|
@ -15,7 +15,7 @@ extern xcb_connection_t *conn;
|
||||||
* Calculates sum of heights and sum of widths of all currently active outputs
|
* Calculates sum of heights and sum of widths of all currently active outputs
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Rect total_outputs_dimensions() {
|
static Rect total_outputs_dimensions(void) {
|
||||||
Output *output;
|
Output *output;
|
||||||
/* Use Rect to encapsulate dimensions, ignoring x/y */
|
/* Use Rect to encapsulate dimensions, ignoring x/y */
|
||||||
Rect outputs_dimensions = {0, 0, 0, 0};
|
Rect outputs_dimensions = {0, 0, 0, 0};
|
||||||
|
|
|
@ -1007,7 +1007,7 @@ static struct property_handler_t property_handlers[] = {
|
||||||
* received from X11
|
* received from X11
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void property_handlers_init() {
|
void property_handlers_init(void) {
|
||||||
|
|
||||||
sn_monitor_context_new(sndisplay, conn_screen, startup_monitor_event, NULL, NULL);
|
sn_monitor_context_new(sndisplay, conn_screen, startup_monitor_event, NULL, NULL);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ void ipc_send_event(const char *event, uint32_t message_type, const char *payloa
|
||||||
* when exiting or restarting only!
|
* when exiting or restarting only!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ipc_shutdown() {
|
void ipc_shutdown(void) {
|
||||||
ipc_client *current;
|
ipc_client *current;
|
||||||
while (!TAILQ_EMPTY(&all_clients)) {
|
while (!TAILQ_EMPTY(&all_clients)) {
|
||||||
current = TAILQ_FIRST(&all_clients);
|
current = TAILQ_FIRST(&all_clients);
|
||||||
|
|
|
@ -59,7 +59,7 @@ static int logbuffer_shm;
|
||||||
* Necessary to print the i3 SHM log in the correct order.
|
* Necessary to print the i3 SHM log in the correct order.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void store_log_markers() {
|
static void store_log_markers(void) {
|
||||||
i3_shmlog_header *header = (i3_shmlog_header*)logbuffer;
|
i3_shmlog_header *header = (i3_shmlog_header*)logbuffer;
|
||||||
|
|
||||||
header->offset_next_write = (logwalk - logbuffer);
|
header->offset_next_write = (logwalk - logbuffer);
|
||||||
|
@ -74,7 +74,7 @@ static void store_log_markers() {
|
||||||
* Will be called twice if --shmlog-size is specified.
|
* Will be called twice if --shmlog-size is specified.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void init_logging() {
|
void init_logging(void) {
|
||||||
if (!errorfilename) {
|
if (!errorfilename) {
|
||||||
if (!(errorfilename = get_process_filename("errorlog")))
|
if (!(errorfilename = get_process_filename("errorlog")))
|
||||||
ELOG("Could not initialize errorlog\n");
|
ELOG("Could not initialize errorlog\n");
|
||||||
|
|
|
@ -212,7 +212,7 @@ static void xkb_got_event(EV_P_ struct ev_io *w, int revents) {
|
||||||
* Exit handler which destroys the main_loop. Will trigger cleanup handlers.
|
* Exit handler which destroys the main_loop. Will trigger cleanup handlers.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void i3_exit() {
|
static void i3_exit(void) {
|
||||||
/* We need ev >= 4 for the following code. Since it is not *that* important (it
|
/* We need ev >= 4 for the following code. Since it is not *that* important (it
|
||||||
* only makes sure that there are no i3-nagbar instances left behind) we still
|
* only makes sure that there are no i3-nagbar instances left behind) we still
|
||||||
* support old systems with libev 3. */
|
* support old systems with libev 3. */
|
||||||
|
|
|
@ -47,7 +47,7 @@ void manage_existing_windows(xcb_window_t root) {
|
||||||
* side-effects which are to be expected when continuing to run i3.
|
* side-effects which are to be expected when continuing to run i3.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void restore_geometry() {
|
void restore_geometry(void) {
|
||||||
DLOG("Restoring geometry\n");
|
DLOG("Restoring geometry\n");
|
||||||
|
|
||||||
Con *con;
|
Con *con;
|
||||||
|
|
|
@ -60,7 +60,7 @@ Output *get_output_by_name(const char *name) {
|
||||||
* Returns the first output which is active.
|
* Returns the first output which is active.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Output *get_first_output() {
|
Output *get_first_output(void) {
|
||||||
Output *output;
|
Output *output;
|
||||||
|
|
||||||
TAILQ_FOREACH(output, &outputs, outputs)
|
TAILQ_FOREACH(output, &outputs, outputs)
|
||||||
|
@ -539,7 +539,7 @@ static void handle_output(xcb_connection_t *conn, xcb_randr_output_t id,
|
||||||
* (Re-)queries the outputs via RandR and stores them in the list of outputs.
|
* (Re-)queries the outputs via RandR and stores them in the list of outputs.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void randr_query_outputs() {
|
void randr_query_outputs(void) {
|
||||||
Output *output, *other, *first;
|
Output *output, *other, *first;
|
||||||
xcb_randr_get_output_primary_cookie_t pcookie;
|
xcb_randr_get_output_primary_cookie_t pcookie;
|
||||||
xcb_randr_get_screen_resources_current_cookie_t rcookie;
|
xcb_randr_get_screen_resources_current_cookie_t rcookie;
|
||||||
|
|
|
@ -192,7 +192,7 @@ void handle_signal(int sig, siginfo_t *info, void *data) {
|
||||||
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void setup_signal_handler() {
|
void setup_signal_handler(void) {
|
||||||
struct sigaction action;
|
struct sigaction action;
|
||||||
|
|
||||||
action.sa_sigaction = handle_signal;
|
action.sa_sigaction = handle_signal;
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct all_cons_head all_cons = TAILQ_HEAD_INITIALIZER(all_cons);
|
||||||
* __i3_scratch will live there.
|
* __i3_scratch will live there.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static Con *_create___i3() {
|
static Con *_create___i3(void) {
|
||||||
Con *__i3 = con_new(croot, NULL);
|
Con *__i3 = con_new(croot, NULL);
|
||||||
FREE(__i3->name);
|
FREE(__i3->name);
|
||||||
__i3->name = sstrdup("__i3");
|
__i3->name = sstrdup("__i3");
|
||||||
|
@ -378,7 +378,7 @@ void tree_split(Con *con, orientation_t orientation) {
|
||||||
* Moves focus one level up.
|
* Moves focus one level up.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void level_up() {
|
void level_up(void) {
|
||||||
/* We cannot go up when we are in fullscreen mode at the moment, that would
|
/* We cannot go up when we are in fullscreen mode at the moment, that would
|
||||||
* be totally not intuitive */
|
* be totally not intuitive */
|
||||||
if (focused->fullscreen_mode != CF_NONE) {
|
if (focused->fullscreen_mode != CF_NONE) {
|
||||||
|
@ -399,7 +399,7 @@ void level_up() {
|
||||||
* Moves focus one level down.
|
* Moves focus one level down.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void level_down() {
|
void level_down(void) {
|
||||||
/* Go down the focus stack of the current node */
|
/* Go down the focus stack of the current node */
|
||||||
Con *next = TAILQ_FIRST(&(focused->focus_head));
|
Con *next = TAILQ_FIRST(&(focused->focus_head));
|
||||||
if (next == TAILQ_END(&(focused->focus_head))) {
|
if (next == TAILQ_END(&(focused->focus_head))) {
|
||||||
|
@ -428,7 +428,7 @@ static void mark_unmapped(Con *con) {
|
||||||
* pushing the changes to X11 using x_push_changes().
|
* pushing the changes to X11 using x_push_changes().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void tree_render() {
|
void tree_render(void) {
|
||||||
if (croot == NULL)
|
if (croot == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@ char *get_process_filename(const char *prefix) {
|
||||||
#define y(x, ...) yajl_gen_ ## x (gen, ##__VA_ARGS__)
|
#define y(x, ...) yajl_gen_ ## x (gen, ##__VA_ARGS__)
|
||||||
#define ystr(str) yajl_gen_string(gen, (unsigned char*)str, strlen(str))
|
#define ystr(str) yajl_gen_string(gen, (unsigned char*)str, strlen(str))
|
||||||
|
|
||||||
char *store_restart_layout() {
|
char *store_restart_layout(void) {
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
#if YAJL_MAJOR >= 2
|
#if YAJL_MAJOR >= 2
|
||||||
yajl_gen gen = yajl_gen_alloc(NULL);
|
yajl_gen gen = yajl_gen_alloc(NULL);
|
||||||
|
|
|
@ -393,7 +393,7 @@ void workspace_show_by_name(const char *num) {
|
||||||
* Focuses the next workspace.
|
* Focuses the next workspace.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_next() {
|
Con* workspace_next(void) {
|
||||||
Con *current = con_get_workspace(focused);
|
Con *current = con_get_workspace(focused);
|
||||||
Con *next = NULL;
|
Con *next = NULL;
|
||||||
Con *output;
|
Con *output;
|
||||||
|
@ -463,7 +463,7 @@ workspace_next_end:
|
||||||
* Focuses the previous workspace.
|
* Focuses the previous workspace.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_prev() {
|
Con* workspace_prev(void) {
|
||||||
Con *current = con_get_workspace(focused);
|
Con *current = con_get_workspace(focused);
|
||||||
Con *prev = NULL;
|
Con *prev = NULL;
|
||||||
Con *output;
|
Con *output;
|
||||||
|
@ -535,7 +535,7 @@ workspace_prev_end:
|
||||||
* Focuses the next workspace on the same output.
|
* Focuses the next workspace on the same output.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_next_on_output() {
|
Con* workspace_next_on_output(void) {
|
||||||
Con *current = con_get_workspace(focused);
|
Con *current = con_get_workspace(focused);
|
||||||
Con *next = NULL;
|
Con *next = NULL;
|
||||||
Con *output = con_get_output(focused);
|
Con *output = con_get_output(focused);
|
||||||
|
@ -590,7 +590,7 @@ workspace_next_on_output_end:
|
||||||
* Focuses the previous workspace on same output.
|
* Focuses the previous workspace on same output.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Con* workspace_prev_on_output() {
|
Con* workspace_prev_on_output(void) {
|
||||||
Con *current = con_get_workspace(focused);
|
Con *current = con_get_workspace(focused);
|
||||||
Con *prev = NULL;
|
Con *prev = NULL;
|
||||||
Con *output = con_get_output(focused);
|
Con *output = con_get_output(focused);
|
||||||
|
@ -646,7 +646,7 @@ workspace_prev_on_output_end:
|
||||||
* Focuses the previously focused workspace.
|
* Focuses the previously focused workspace.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void workspace_back_and_forth() {
|
void workspace_back_and_forth(void) {
|
||||||
if (!previous_workspace_name) {
|
if (!previous_workspace_name) {
|
||||||
DLOG("No previous workspace name set. Not switching.");
|
DLOG("No previous workspace name set. Not switching.");
|
||||||
return;
|
return;
|
||||||
|
|
2
src/x.c
2
src/x.c
|
@ -1013,7 +1013,7 @@ void x_set_name(Con *con, const char *name) {
|
||||||
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
|
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void x_set_i3_atoms() {
|
void x_set_i3_atoms(void) {
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
|
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
|
||||||
(current_socketpath == NULL ? 0 : strlen(current_socketpath)),
|
(current_socketpath == NULL ? 0 : strlen(current_socketpath)),
|
||||||
current_socketpath);
|
current_socketpath);
|
||||||
|
|
|
@ -31,7 +31,7 @@ static Cursor load_cursor(const char *name) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xcursor_load_cursors() {
|
void xcursor_load_cursors(void) {
|
||||||
cursors[XCURSOR_CURSOR_POINTER] = load_cursor("left_ptr");
|
cursors[XCURSOR_CURSOR_POINTER] = load_cursor("left_ptr");
|
||||||
cursors[XCURSOR_CURSOR_RESIZE_HORIZONTAL] = load_cursor("sb_h_double_arrow");
|
cursors[XCURSOR_CURSOR_RESIZE_HORIZONTAL] = load_cursor("sb_h_double_arrow");
|
||||||
cursors[XCURSOR_CURSOR_RESIZE_VERTICAL] = load_cursor("sb_v_double_arrow");
|
cursors[XCURSOR_CURSOR_RESIZE_VERTICAL] = load_cursor("sb_v_double_arrow");
|
||||||
|
|
|
@ -90,7 +90,7 @@ static void query_screens(xcb_connection_t *conn) {
|
||||||
* information to setup workspaces for each screen.
|
* information to setup workspaces for each screen.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void xinerama_init() {
|
void xinerama_init(void) {
|
||||||
if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
|
if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
|
||||||
DLOG("Xinerama extension not found, disabling.\n");
|
DLOG("Xinerama extension not found, disabling.\n");
|
||||||
disable_randr(conn);
|
disable_randr(conn);
|
||||||
|
|
Loading…
Reference in New Issue