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