commit 83c6548
Michael Forney
·
2015-03-16 04:52:51 +0000 UTC
parent 44bda01
Declare functions with no parameters properly
33 files changed,
+66,
-66
+1,
-1
1@@ -264,7 +264,7 @@ static struct {
2 } data_buffer;
3
4 static void
5-init_data_buffer()
6+init_data_buffer(void)
7 {
8 data_buffer.data = malloc(sizeof(uint32_t) * 10);
9 data_buffer.capacity = 10;
+2,
-2
1@@ -86,7 +86,7 @@ static void __attribute__((noreturn)) usage(const char * name)
2 exit(2);
3 }
4
5-static void start_devices()
6+static void start_devices(void)
7 {
8 unsigned index;
9
10@@ -122,7 +122,7 @@ static void stop_devices(bool fatal)
11 launcher.num_input_fds = 0;
12 }
13
14-static void cleanup()
15+static void cleanup(void)
16 {
17 struct vt_mode mode = { .mode = VT_AUTO };
18
+2,
-2
1@@ -147,7 +147,7 @@ bool handle_button(struct pointer_handler * handler, uint32_t time,
2 return handle_binding(time, &button->press, state, &find_button_binding);
3 }
4
5-bool swc_bindings_initialize()
6+bool swc_bindings_initialize(void)
7 {
8 wl_array_init(&key_bindings);
9 wl_array_init(&button_bindings);
10@@ -155,7 +155,7 @@ bool swc_bindings_initialize()
11 return true;
12 }
13
14-void swc_bindings_finalize()
15+void swc_bindings_finalize(void)
16 {
17 wl_array_release(&key_bindings);
18 wl_array_release(&button_bindings);
+2,
-2
1@@ -32,8 +32,8 @@ struct swc_bindings
2 struct pointer_handler * pointer_handler;
3 };
4
5-bool swc_bindings_initialize();
6-void swc_bindings_finalize();
7+bool swc_bindings_initialize(void);
8+void swc_bindings_finalize(void);
9
10 #endif
11
+3,
-3
1@@ -589,7 +589,7 @@ void compositor_view_set_border_color(struct compositor_view * view,
2
3 /* }}} */
4
5-static void calculate_damage()
6+static void calculate_damage(void)
7 {
8 struct compositor_view * view;
9 pixman_region32_t surface_opaque, * surface_damage;
10@@ -834,7 +834,7 @@ static void bind_compositor(struct wl_client * client, void * data,
11 NULL, NULL);
12 }
13
14-bool swc_compositor_initialize()
15+bool swc_compositor_initialize(void)
16 {
17 struct screen * screen;
18 uint32_t keysym;
19@@ -874,7 +874,7 @@ bool swc_compositor_initialize()
20 return true;
21 }
22
23-void swc_compositor_finalize()
24+void swc_compositor_finalize(void)
25 {
26 pixman_region32_fini(&compositor.damage);
27 pixman_region32_fini(&compositor.opaque);
+2,
-2
1@@ -44,8 +44,8 @@ struct swc_compositor
2 } signal;
3 };
4
5-bool swc_compositor_initialize();
6-void swc_compositor_finalize();
7+bool swc_compositor_initialize(void);
8+void swc_compositor_finalize(void);
9
10 struct compositor_view
11 {
+1,
-1
1@@ -124,7 +124,7 @@ static void data_destroy(struct wl_resource * source)
2 free(data);
3 }
4
5-static struct data * data_new()
6+static struct data * data_new(void)
7 {
8 struct data * data;
9
+2,
-2
1@@ -72,7 +72,7 @@ static void bind_data_device_manager(struct wl_client * client, void * data,
2 (resource, &data_device_manager_implementation, NULL, NULL);
3 }
4
5-bool data_device_manager_initialize()
6+bool data_device_manager_initialize(void)
7 {
8 data_device_manager.global
9 = wl_global_create(swc.display, &wl_data_device_manager_interface, 1,
10@@ -81,7 +81,7 @@ bool data_device_manager_initialize()
11 return data_device_manager.global != NULL;
12 }
13
14-void data_device_manager_finalize()
15+void data_device_manager_finalize(void)
16 {
17 wl_global_destroy(data_device_manager.global);
18 }
+2,
-2
1@@ -26,8 +26,8 @@
2
3 #include <stdbool.h>
4
5-bool data_device_manager_initialize();
6-void data_device_manager_finalize();
7+bool data_device_manager_initialize(void);
8+void data_device_manager_finalize(void);
9
10 #endif
11
+2,
-2
1@@ -268,7 +268,7 @@ static void bind_drm(struct wl_client * client, void * data, uint32_t version,
2 wl_drm_send_format(resource, WL_DRM_FORMAT_ARGB8888);
3 }
4
5-bool swc_drm_initialize()
6+bool swc_drm_initialize(void)
7 {
8 struct stat master, render;
9
10@@ -361,7 +361,7 @@ bool swc_drm_initialize()
11 return false;
12 }
13
14-void swc_drm_finalize()
15+void swc_drm_finalize(void)
16 {
17 if (drm.global)
18 wl_global_destroy(drm.global);
+2,
-2
1@@ -17,8 +17,8 @@ struct swc_drm
2 struct wld_renderer * renderer;
3 };
4
5-bool swc_drm_initialize();
6-void swc_drm_finalize();
7+bool swc_drm_initialize(void);
8+void swc_drm_finalize(void);
9
10 bool swc_drm_create_screens(struct wl_list * screens);
11
+2,
-2
1@@ -55,8 +55,8 @@ struct swc
2
3 extern struct swc swc;
4
5-void swc_activate();
6-void swc_deactivate();
7+void swc_activate(void);
8+void swc_deactivate(void);
9
10 #endif
11
+2,
-2
1@@ -64,7 +64,7 @@ static int handle_data(int fd, uint32_t mask, void * data)
2 return 1;
3 }
4
5-bool launch_initialize()
6+bool launch_initialize(void)
7 {
8 char * socket_string, * end;
9
10@@ -85,7 +85,7 @@ bool launch_initialize()
11 return true;
12 }
13
14-void launch_finalize()
15+void launch_finalize(void)
16 {
17 wl_event_source_remove(launch.source);
18 close(launch.socket);
+2,
-2
1@@ -27,8 +27,8 @@
2 #include <stdbool.h>
3 #include <wayland-server.h>
4
5-bool launch_initialize();
6-void launch_finalize();
7+bool launch_initialize(void);
8+void launch_finalize(void);
9
10 int launch_open_device(const char * path, int flags);
11 bool launch_activate_vt(unsigned vt);
+2,
-2
1@@ -61,7 +61,7 @@ static void bind_panel_manager(struct wl_client * client, void * data,
2 NULL, NULL);
3 }
4
5-bool panel_manager_initialize()
6+bool panel_manager_initialize(void)
7 {
8 panel_manager.global = wl_global_create(swc.display,
9 &swc_panel_manager_interface, 1,
10@@ -73,7 +73,7 @@ bool panel_manager_initialize()
11 return true;
12 }
13
14-void panel_manager_finalize()
15+void panel_manager_finalize(void)
16 {
17 wl_global_destroy(panel_manager.global);
18 }
+2,
-2
1@@ -26,8 +26,8 @@
2
3 #include <stdbool.h>
4
5-bool panel_manager_initialize();
6-void panel_manager_finalize();
7+bool panel_manager_initialize(void);
8+void panel_manager_finalize(void);
9
10 #endif
11
+2,
-2
1@@ -57,7 +57,7 @@ void swc_screen_set_handler(struct swc_screen * base,
2 screen->handler_data = data;
3 }
4
5-bool screens_initialize()
6+bool screens_initialize(void)
7 {
8 wl_list_init(&swc.screens);
9
10@@ -70,7 +70,7 @@ bool screens_initialize()
11 return true;
12 }
13
14-void screens_finalize()
15+void screens_finalize(void)
16 {
17 struct screen * screen, * tmp;
18
+2,
-2
1@@ -69,8 +69,8 @@ struct screen
2 struct wl_list link;
3 };
4
5-bool screens_initialize();
6-void screens_finalize();
7+bool screens_initialize(void);
8+void screens_finalize(void);
9
10 struct screen * screen_new(uint32_t crtc, struct swc_output * output);
11 void screen_destroy(struct screen * screen);
+3,
-3
1@@ -397,7 +397,7 @@ bool initialize_libinput(const char * seat_name)
2 return false;
3 }
4
5-void finalize_libinput()
6+void finalize_libinput(void)
7 {
8 wl_event_source_remove(seat.libinput_source);
9 libinput_unref(seat.libinput);
10@@ -432,7 +432,7 @@ static int select_device(const struct dirent * entry)
11 return sscanf(entry->d_name, "event%u", &num) == 1;
12 }
13
14-static bool add_devices()
15+static bool add_devices(void)
16 {
17 struct dirent ** devices;
18 int num_devices;
19@@ -527,7 +527,7 @@ bool swc_seat_initialize(const char * seat_name)
20 return false;
21 }
22
23-void swc_seat_finalize()
24+void swc_seat_finalize(void)
25 {
26 #ifdef ENABLE_LIBINPUT
27 finalize_libinput();
+2,
-2
1@@ -34,8 +34,8 @@ struct swc_seat
2 };
3
4 bool swc_seat_initialize(const char * seat_name);
5-void swc_seat_finalize();
6-void swc_seat_reopen_devices();
7+void swc_seat_finalize(void);
8+void swc_seat_reopen_devices(void);
9
10 #endif
11
+2,
-2
1@@ -62,7 +62,7 @@ static void bind_shell(struct wl_client * client, void * data,
2 wl_resource_set_implementation(resource, &shell_implementation, NULL, NULL);
3 }
4
5-bool swc_shell_initialize()
6+bool swc_shell_initialize(void)
7 {
8 shell.global = wl_global_create(swc.display, &wl_shell_interface, 1,
9 NULL, &bind_shell);
10@@ -70,7 +70,7 @@ bool swc_shell_initialize()
11 return shell.global;
12 }
13
14-void swc_shell_finalize()
15+void swc_shell_finalize(void)
16 {
17 wl_global_destroy(shell.global);
18 }
+2,
-2
1@@ -26,8 +26,8 @@
2
3 #include <stdbool.h>
4
5-bool swc_shell_initialize();
6-void swc_shell_finalize();
7+bool swc_shell_initialize(void);
8+void swc_shell_finalize(void);
9
10 #endif
11
+2,
-2
1@@ -237,7 +237,7 @@ static void bind_shm(struct wl_client * client, void * data, uint32_t version,
2 wl_shm_send_format(resource, WL_SHM_FORMAT_ARGB8888);
3 }
4
5-bool swc_shm_initialize()
6+bool swc_shm_initialize(void)
7 {
8 if (!(swc.shm->context = wld_pixman_create_context()))
9 goto error0;
10@@ -261,7 +261,7 @@ bool swc_shm_initialize()
11 return false;
12 }
13
14-void swc_shm_finalize()
15+void swc_shm_finalize(void)
16 {
17 wl_global_destroy(shm.global);
18 wld_destroy_renderer(swc.shm->renderer);
+2,
-2
1@@ -32,9 +32,9 @@ struct swc_shm
2 struct wld_renderer * renderer;
3 };
4
5-bool swc_shm_initialize();
6+bool swc_shm_initialize(void);
7
8-void swc_shm_finalize();
9+void swc_shm_finalize(void);
10
11 #endif
12
+4,
-4
1@@ -66,7 +66,7 @@ struct swc swc = {
2 #endif
3 };
4
5-static void setup_compositor()
6+static void setup_compositor(void)
7 {
8 pixman_region32_t pointer_region;
9 struct screen * screen;
10@@ -98,13 +98,13 @@ static void setup_compositor()
11 pixman_region32_fini(&pointer_region);
12 }
13
14-void swc_activate()
15+void swc_activate(void)
16 {
17 swc.active = true;
18 swc_send_event(&swc.event_signal, SWC_EVENT_ACTIVATED, NULL);
19 }
20
21-void swc_deactivate()
22+void swc_deactivate(void)
23 {
24 swc.active = false;
25 swc_send_event(&swc.event_signal, SWC_EVENT_DEACTIVATED, NULL);
26@@ -228,7 +228,7 @@ bool swc_initialize(struct wl_display * display,
27 }
28
29 EXPORT
30-void swc_finalize()
31+void swc_finalize(void)
32 {
33 #ifdef ENABLE_XWAYLAND
34 xserver_finalize();
+1,
-1
1@@ -334,7 +334,7 @@ bool swc_initialize(struct wl_display * display,
2 /**
3 * Stops the compositor, releasing any used resources.
4 */
5-void swc_finalize();
6+void swc_finalize(void);
7
8 #endif
9
+1,
-1
1@@ -64,7 +64,7 @@ struct wl_resource;
2
3 void swc_remove_resource(struct wl_resource * resource);
4
5-static inline uint32_t swc_time()
6+static inline uint32_t swc_time(void)
7 {
8 struct timeval timeval;
9
+2,
-2
1@@ -135,7 +135,7 @@ static void bind_shell(struct wl_client * client, void * data,
2 NULL, NULL, NULL);
3 }
4
5-bool xdg_shell_initialize()
6+bool xdg_shell_initialize(void)
7 {
8 shell.global = wl_global_create(swc.display, &xdg_shell_interface, 1,
9 NULL, &bind_shell);
10@@ -143,7 +143,7 @@ bool xdg_shell_initialize()
11 return shell.global;
12 }
13
14-void xdg_shell_finalize()
15+void xdg_shell_finalize(void)
16 {
17 wl_global_destroy(shell.global);
18 }
+2,
-2
1@@ -26,8 +26,8 @@
2
3 #include <stdbool.h>
4
5-bool xdg_shell_initialize();
6-void xdg_shell_finalize();
7+bool xdg_shell_initialize(void);
8+void xdg_shell_finalize(void);
9
10 #endif
11
+4,
-4
1@@ -84,7 +84,7 @@ static int open_socket(struct sockaddr_un * addr, size_t path_size)
2 return -1;
3 }
4
5-static bool open_display()
6+static bool open_display(void)
7 {
8 char lock_name[64], pid[12];
9 int lock_fd;
10@@ -169,7 +169,7 @@ static bool open_display()
11 return true;
12 }
13
14-static void close_display()
15+static void close_display(void)
16 {
17 char path[64];
18
19@@ -197,7 +197,7 @@ static int handle_usr1(int signal_number, void * data)
20 return 0;
21 }
22
23-bool xserver_initialize()
24+bool xserver_initialize(void)
25 {
26 int wl[2], wm[2];
27
28@@ -314,7 +314,7 @@ bool xserver_initialize()
29 return false;
30 }
31
32-void xserver_finalize()
33+void xserver_finalize(void)
34 {
35 xwm_finalize();
36 close_display();
+2,
-2
1@@ -31,8 +31,8 @@ struct swc_xserver
2 struct wl_client * client;
3 };
4
5-bool xserver_initialize();
6-void xserver_finalize();
7+bool xserver_initialize(void);
8+void xserver_finalize(void);
9
10 #endif
11
+1,
-1
1@@ -565,7 +565,7 @@ bool xwm_initialize(int fd)
2 return false;
3 }
4
5-void xwm_finalize()
6+void xwm_finalize(void)
7 {
8 wl_event_source_remove(xwm.source);
9 xcb_ewmh_connection_wipe(&xwm.ewmh);
+1,
-1
1@@ -27,7 +27,7 @@
2 #include <stdbool.h>
3
4 bool xwm_initialize(int fd);
5-void xwm_finalize();
6+void xwm_finalize(void);
7
8 #endif
9