Turn funcs() into funcs(void)
If they really do not take undefined number of arguments.
This commit is contained in:
parent
d8200012fb
commit
1e70f7b19e
|
@ -469,7 +469,7 @@ struct seat_config *copy_seat_config(struct seat_config *seat);
|
|||
|
||||
void free_seat_config(struct seat_config *ic);
|
||||
|
||||
struct seat_attachment_config *seat_attachment_config_new();
|
||||
struct seat_attachment_config *seat_attachment_config_new(void);
|
||||
|
||||
struct seat_attachment_config *seat_config_get_attachment(
|
||||
struct seat_config *seat_config, char *identifier);
|
||||
|
|
|
@ -17,6 +17,6 @@ struct sway_debug {
|
|||
|
||||
extern struct sway_debug debug;
|
||||
|
||||
void update_debug_tree();
|
||||
void update_debug_tree(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "sway/tree/container.h"
|
||||
#include "sway/input/input-manager.h"
|
||||
|
||||
json_object *ipc_json_get_version();
|
||||
json_object *ipc_json_get_version(void);
|
||||
|
||||
json_object *ipc_json_describe_disabled_output(struct sway_output *o);
|
||||
json_object *ipc_json_describe_node(struct sway_node *node);
|
||||
|
|
|
@ -50,7 +50,7 @@ struct swaybar_config {
|
|||
} colors;
|
||||
};
|
||||
|
||||
struct swaybar_config *init_config();
|
||||
struct swaybar_config *init_config(void);
|
||||
void free_config(struct swaybar_config *config);
|
||||
uint32_t parse_position(const char *position);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ struct seat_config *new_seat_config(const char* name) {
|
|||
return seat;
|
||||
}
|
||||
|
||||
struct seat_attachment_config *seat_attachment_config_new() {
|
||||
struct seat_attachment_config *seat_attachment_config_new(void) {
|
||||
struct seat_attachment_config *attachment =
|
||||
calloc(1, sizeof(struct seat_attachment_config));
|
||||
if (!attachment) {
|
||||
|
|
|
@ -120,7 +120,7 @@ static int draw_node(cairo_t *cairo, struct sway_node *node,
|
|||
return height;
|
||||
}
|
||||
|
||||
void update_debug_tree() {
|
||||
void update_debug_tree(void) {
|
||||
if (!debug.render_tree) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
// when dragging to the edge of a layout container.
|
||||
#define DROP_LAYOUT_BORDER 30
|
||||
|
||||
static uint32_t get_current_time_msec() {
|
||||
static uint32_t get_current_time_msec(void) {
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
return now.tv_nsec / 1000;
|
||||
|
|
|
@ -42,7 +42,7 @@ static const char *ipc_json_orientation_description(enum sway_container_layout l
|
|||
return "none";
|
||||
}
|
||||
|
||||
json_object *ipc_json_get_version() {
|
||||
json_object *ipc_json_get_version(void) {
|
||||
int major = 0, minor = 0, patch = 0;
|
||||
json_object *version = json_object_new_object();
|
||||
|
||||
|
|
10
sway/main.c
10
sway/main.c
|
@ -41,7 +41,7 @@ void sig_handler(int signal) {
|
|||
sway_terminate(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
void detect_raspi() {
|
||||
void detect_raspi(void) {
|
||||
bool raspi = false;
|
||||
FILE *f = fopen("/sys/firmware/devicetree/base/model", "r");
|
||||
if (!f) {
|
||||
|
@ -81,7 +81,7 @@ void detect_raspi() {
|
|||
}
|
||||
}
|
||||
|
||||
void detect_proprietary() {
|
||||
void detect_proprietary(void) {
|
||||
FILE *f = fopen("/proc/modules", "r");
|
||||
if (!f) {
|
||||
return;
|
||||
|
@ -116,7 +116,7 @@ void run_as_ipc_client(char *command, char *socket_path) {
|
|||
close(socketfd);
|
||||
}
|
||||
|
||||
static void log_env() {
|
||||
static void log_env(void) {
|
||||
const char *log_vars[] = {
|
||||
"PATH",
|
||||
"LD_LIBRARY_PATH",
|
||||
|
@ -131,7 +131,7 @@ static void log_env() {
|
|||
}
|
||||
}
|
||||
|
||||
static void log_distro() {
|
||||
static void log_distro(void) {
|
||||
const char *paths[] = {
|
||||
"/etc/lsb-release",
|
||||
"/etc/os-release",
|
||||
|
@ -158,7 +158,7 @@ static void log_distro() {
|
|||
}
|
||||
}
|
||||
|
||||
static void log_kernel() {
|
||||
static void log_kernel(void) {
|
||||
FILE *f = popen("uname -a", "r");
|
||||
if (!f) {
|
||||
wlr_log(WLR_INFO, "Unable to determine kernel version");
|
||||
|
|
|
@ -593,7 +593,7 @@ void container_update_representation(struct sway_container *con) {
|
|||
}
|
||||
}
|
||||
|
||||
size_t container_titlebar_height() {
|
||||
size_t container_titlebar_height(void) {
|
||||
return config->font_height + TITLEBAR_V_PADDING * 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ uint32_t parse_position(const char *position) {
|
|||
}
|
||||
}
|
||||
|
||||
struct swaybar_config *init_config() {
|
||||
struct swaybar_config *init_config(void) {
|
||||
struct swaybar_config *config = calloc(1, sizeof(struct swaybar_config));
|
||||
config->status_command = NULL;
|
||||
config->pango_markup = false;
|
||||
|
|
|
@ -92,7 +92,7 @@ static int release_lock(void *data) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void acquire_sleep_lock() {
|
||||
void acquire_sleep_lock(void) {
|
||||
sd_bus_message *msg = NULL;
|
||||
sd_bus_error error = SD_BUS_ERROR_NULL;
|
||||
struct sd_bus *bus;
|
||||
|
@ -161,7 +161,7 @@ static int dbus_event(int fd, uint32_t mask, void *data) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void setup_sleep_listener() {
|
||||
void setup_sleep_listener(void) {
|
||||
struct sd_bus *bus;
|
||||
|
||||
int ret = sd_bus_default_system(&bus);
|
||||
|
|
|
@ -32,7 +32,7 @@ void sway_terminate(int exit_code) {
|
|||
exit(exit_code);
|
||||
}
|
||||
|
||||
static void daemonize() {
|
||||
static void daemonize(void) {
|
||||
int fds[2];
|
||||
if (pipe(fds) != 0) {
|
||||
wlr_log(WLR_ERROR, "Failed to pipe");
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "util.h"
|
||||
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
|
||||
|
||||
static char *read_from_stdin() {
|
||||
static char *read_from_stdin(void) {
|
||||
char *buffer = NULL;
|
||||
while (!feof(stdin)) {
|
||||
char *line = read_line(stdin);
|
||||
|
|
Loading…
Reference in a new issue