diff options
author | Arkadiusz Hiler <arek@hiler.eu> | 2018-09-30 13:58:49 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arek@hiler.eu> | 2018-09-30 14:09:05 +0300 |
commit | 1e70f7b19e92c20a691f2697b2c92ea8b13daba3 (patch) | |
tree | 112f684404755d6924d7338507eaef07500ced1f | |
parent | Remove declarations that do no have definitions (diff) | |
download | sway-1e70f7b19e92c20a691f2697b2c92ea8b13daba3.tar.gz sway-1e70f7b19e92c20a691f2697b2c92ea8b13daba3.tar.zst sway-1e70f7b19e92c20a691f2697b2c92ea8b13daba3.zip |
Turn funcs() into funcs(void)
If they really do not take undefined number of arguments.
-rw-r--r-- | include/sway/config.h | 2 | ||||
-rw-r--r-- | include/sway/debug.h | 2 | ||||
-rw-r--r-- | include/sway/ipc-json.h | 2 | ||||
-rw-r--r-- | include/swaybar/config.h | 2 | ||||
-rw-r--r-- | sway/config/seat.c | 2 | ||||
-rw-r--r-- | sway/debug-tree.c | 2 | ||||
-rw-r--r-- | sway/input/cursor.c | 2 | ||||
-rw-r--r-- | sway/ipc-json.c | 2 | ||||
-rw-r--r-- | sway/main.c | 10 | ||||
-rw-r--r-- | sway/tree/container.c | 2 | ||||
-rw-r--r-- | swaybar/config.c | 2 | ||||
-rw-r--r-- | swayidle/main.c | 4 | ||||
-rw-r--r-- | swaylock/main.c | 2 | ||||
-rw-r--r-- | swaynag/config.c | 2 |
14 files changed, 19 insertions, 19 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 1c6e2ac4..5e28c678 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -469,7 +469,7 @@ struct seat_config *copy_seat_config(struct seat_config *seat); | |||
469 | 469 | ||
470 | void free_seat_config(struct seat_config *ic); | 470 | void free_seat_config(struct seat_config *ic); |
471 | 471 | ||
472 | struct seat_attachment_config *seat_attachment_config_new(); | 472 | struct seat_attachment_config *seat_attachment_config_new(void); |
473 | 473 | ||
474 | struct seat_attachment_config *seat_config_get_attachment( | 474 | struct seat_attachment_config *seat_config_get_attachment( |
475 | struct seat_config *seat_config, char *identifier); | 475 | struct seat_config *seat_config, char *identifier); |
diff --git a/include/sway/debug.h b/include/sway/debug.h index bf3a5f6d..0e9bb056 100644 --- a/include/sway/debug.h +++ b/include/sway/debug.h | |||
@@ -17,6 +17,6 @@ struct sway_debug { | |||
17 | 17 | ||
18 | extern struct sway_debug debug; | 18 | extern struct sway_debug debug; |
19 | 19 | ||
20 | void update_debug_tree(); | 20 | void update_debug_tree(void); |
21 | 21 | ||
22 | #endif | 22 | #endif |
diff --git a/include/sway/ipc-json.h b/include/sway/ipc-json.h index fef243e3..1cbfd15d 100644 --- a/include/sway/ipc-json.h +++ b/include/sway/ipc-json.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "sway/tree/container.h" | 4 | #include "sway/tree/container.h" |
5 | #include "sway/input/input-manager.h" | 5 | #include "sway/input/input-manager.h" |
6 | 6 | ||
7 | json_object *ipc_json_get_version(); | 7 | json_object *ipc_json_get_version(void); |
8 | 8 | ||
9 | json_object *ipc_json_describe_disabled_output(struct sway_output *o); | 9 | json_object *ipc_json_describe_disabled_output(struct sway_output *o); |
10 | json_object *ipc_json_describe_node(struct sway_node *node); | 10 | json_object *ipc_json_describe_node(struct sway_node *node); |
diff --git a/include/swaybar/config.h b/include/swaybar/config.h index 6739c28a..5f5688cf 100644 --- a/include/swaybar/config.h +++ b/include/swaybar/config.h | |||
@@ -50,7 +50,7 @@ struct swaybar_config { | |||
50 | } colors; | 50 | } colors; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct swaybar_config *init_config(); | 53 | struct swaybar_config *init_config(void); |
54 | void free_config(struct swaybar_config *config); | 54 | void free_config(struct swaybar_config *config); |
55 | uint32_t parse_position(const char *position); | 55 | uint32_t parse_position(const char *position); |
56 | 56 | ||
diff --git a/sway/config/seat.c b/sway/config/seat.c index 83dac4c0..46456caf 100644 --- a/sway/config/seat.c +++ b/sway/config/seat.c | |||
@@ -30,7 +30,7 @@ struct seat_config *new_seat_config(const char* name) { | |||
30 | return seat; | 30 | return seat; |
31 | } | 31 | } |
32 | 32 | ||
33 | struct seat_attachment_config *seat_attachment_config_new() { | 33 | struct seat_attachment_config *seat_attachment_config_new(void) { |
34 | struct seat_attachment_config *attachment = | 34 | struct seat_attachment_config *attachment = |
35 | calloc(1, sizeof(struct seat_attachment_config)); | 35 | calloc(1, sizeof(struct seat_attachment_config)); |
36 | if (!attachment) { | 36 | if (!attachment) { |
diff --git a/sway/debug-tree.c b/sway/debug-tree.c index 9644f4e5..16b479f9 100644 --- a/sway/debug-tree.c +++ b/sway/debug-tree.c | |||
@@ -120,7 +120,7 @@ static int draw_node(cairo_t *cairo, struct sway_node *node, | |||
120 | return height; | 120 | return height; |
121 | } | 121 | } |
122 | 122 | ||
123 | void update_debug_tree() { | 123 | void update_debug_tree(void) { |
124 | if (!debug.render_tree) { | 124 | if (!debug.render_tree) { |
125 | return; | 125 | return; |
126 | } | 126 | } |
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 2d5d351f..3ddc27a0 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -30,7 +30,7 @@ | |||
30 | // when dragging to the edge of a layout container. | 30 | // when dragging to the edge of a layout container. |
31 | #define DROP_LAYOUT_BORDER 30 | 31 | #define DROP_LAYOUT_BORDER 30 |
32 | 32 | ||
33 | static uint32_t get_current_time_msec() { | 33 | static uint32_t get_current_time_msec(void) { |
34 | struct timespec now; | 34 | struct timespec now; |
35 | clock_gettime(CLOCK_MONOTONIC, &now); | 35 | clock_gettime(CLOCK_MONOTONIC, &now); |
36 | return now.tv_nsec / 1000; | 36 | return now.tv_nsec / 1000; |
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index f054ac9f..45915094 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -42,7 +42,7 @@ static const char *ipc_json_orientation_description(enum sway_container_layout l | |||
42 | return "none"; | 42 | return "none"; |
43 | } | 43 | } |
44 | 44 | ||
45 | json_object *ipc_json_get_version() { | 45 | json_object *ipc_json_get_version(void) { |
46 | int major = 0, minor = 0, patch = 0; | 46 | int major = 0, minor = 0, patch = 0; |
47 | json_object *version = json_object_new_object(); | 47 | json_object *version = json_object_new_object(); |
48 | 48 | ||
diff --git a/sway/main.c b/sway/main.c index 80111b8f..50b05b21 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -41,7 +41,7 @@ void sig_handler(int signal) { | |||
41 | sway_terminate(EXIT_SUCCESS); | 41 | sway_terminate(EXIT_SUCCESS); |
42 | } | 42 | } |
43 | 43 | ||
44 | void detect_raspi() { | 44 | void detect_raspi(void) { |
45 | bool raspi = false; | 45 | bool raspi = false; |
46 | FILE *f = fopen("/sys/firmware/devicetree/base/model", "r"); | 46 | FILE *f = fopen("/sys/firmware/devicetree/base/model", "r"); |
47 | if (!f) { | 47 | if (!f) { |
@@ -81,7 +81,7 @@ void detect_raspi() { | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | void detect_proprietary() { | 84 | void detect_proprietary(void) { |
85 | FILE *f = fopen("/proc/modules", "r"); | 85 | FILE *f = fopen("/proc/modules", "r"); |
86 | if (!f) { | 86 | if (!f) { |
87 | return; | 87 | return; |
@@ -116,7 +116,7 @@ void run_as_ipc_client(char *command, char *socket_path) { | |||
116 | close(socketfd); | 116 | close(socketfd); |
117 | } | 117 | } |
118 | 118 | ||
119 | static void log_env() { | 119 | static void log_env(void) { |
120 | const char *log_vars[] = { | 120 | const char *log_vars[] = { |
121 | "PATH", | 121 | "PATH", |
122 | "LD_LIBRARY_PATH", | 122 | "LD_LIBRARY_PATH", |
@@ -131,7 +131,7 @@ static void log_env() { | |||
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | static void log_distro() { | 134 | static void log_distro(void) { |
135 | const char *paths[] = { | 135 | const char *paths[] = { |
136 | "/etc/lsb-release", | 136 | "/etc/lsb-release", |
137 | "/etc/os-release", | 137 | "/etc/os-release", |
@@ -158,7 +158,7 @@ static void log_distro() { | |||
158 | } | 158 | } |
159 | } | 159 | } |
160 | 160 | ||
161 | static void log_kernel() { | 161 | static void log_kernel(void) { |
162 | FILE *f = popen("uname -a", "r"); | 162 | FILE *f = popen("uname -a", "r"); |
163 | if (!f) { | 163 | if (!f) { |
164 | wlr_log(WLR_INFO, "Unable to determine kernel version"); | 164 | wlr_log(WLR_INFO, "Unable to determine kernel version"); |
diff --git a/sway/tree/container.c b/sway/tree/container.c index baaa82fd..66370a42 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -593,7 +593,7 @@ void container_update_representation(struct sway_container *con) { | |||
593 | } | 593 | } |
594 | } | 594 | } |
595 | 595 | ||
596 | size_t container_titlebar_height() { | 596 | size_t container_titlebar_height(void) { |
597 | return config->font_height + TITLEBAR_V_PADDING * 2; | 597 | return config->font_height + TITLEBAR_V_PADDING * 2; |
598 | } | 598 | } |
599 | 599 | ||
diff --git a/swaybar/config.c b/swaybar/config.c index db7b0db6..4e851cca 100644 --- a/swaybar/config.c +++ b/swaybar/config.c | |||
@@ -22,7 +22,7 @@ uint32_t parse_position(const char *position) { | |||
22 | } | 22 | } |
23 | } | 23 | } |
24 | 24 | ||
25 | struct swaybar_config *init_config() { | 25 | struct swaybar_config *init_config(void) { |
26 | struct swaybar_config *config = calloc(1, sizeof(struct swaybar_config)); | 26 | struct swaybar_config *config = calloc(1, sizeof(struct swaybar_config)); |
27 | config->status_command = NULL; | 27 | config->status_command = NULL; |
28 | config->pango_markup = false; | 28 | config->pango_markup = false; |
diff --git a/swayidle/main.c b/swayidle/main.c index 678d622f..5b6c95a7 100644 --- a/swayidle/main.c +++ b/swayidle/main.c | |||
@@ -92,7 +92,7 @@ static int release_lock(void *data) { | |||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | void acquire_sleep_lock() { | 95 | void acquire_sleep_lock(void) { |
96 | sd_bus_message *msg = NULL; | 96 | sd_bus_message *msg = NULL; |
97 | sd_bus_error error = SD_BUS_ERROR_NULL; | 97 | sd_bus_error error = SD_BUS_ERROR_NULL; |
98 | struct sd_bus *bus; | 98 | struct sd_bus *bus; |
@@ -161,7 +161,7 @@ static int dbus_event(int fd, uint32_t mask, void *data) { | |||
161 | return 1; | 161 | return 1; |
162 | } | 162 | } |
163 | 163 | ||
164 | void setup_sleep_listener() { | 164 | void setup_sleep_listener(void) { |
165 | struct sd_bus *bus; | 165 | struct sd_bus *bus; |
166 | 166 | ||
167 | int ret = sd_bus_default_system(&bus); | 167 | int ret = sd_bus_default_system(&bus); |
diff --git a/swaylock/main.c b/swaylock/main.c index 693cbc10..ed8c5607 100644 --- a/swaylock/main.c +++ b/swaylock/main.c | |||
@@ -32,7 +32,7 @@ void sway_terminate(int exit_code) { | |||
32 | exit(exit_code); | 32 | exit(exit_code); |
33 | } | 33 | } |
34 | 34 | ||
35 | static void daemonize() { | 35 | static void daemonize(void) { |
36 | int fds[2]; | 36 | int fds[2]; |
37 | if (pipe(fds) != 0) { | 37 | if (pipe(fds) != 0) { |
38 | wlr_log(WLR_ERROR, "Failed to pipe"); | 38 | wlr_log(WLR_ERROR, "Failed to pipe"); |
diff --git a/swaynag/config.c b/swaynag/config.c index 4d0824c9..cd34dcc2 100644 --- a/swaynag/config.c +++ b/swaynag/config.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "util.h" | 11 | #include "util.h" |
12 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" | 12 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" |
13 | 13 | ||
14 | static char *read_from_stdin() { | 14 | static char *read_from_stdin(void) { |
15 | char *buffer = NULL; | 15 | char *buffer = NULL; |
16 | while (!feof(stdin)) { | 16 | while (!feof(stdin)) { |
17 | char *line = read_line(stdin); | 17 | char *line = read_line(stdin); |