aboutsummaryrefslogtreecommitdiff
path: root/examples/idle.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-11-20 00:45:19 +0100
committerScott Anderson <scott@anderso.nz>2019-11-20 02:05:03 +0000
commit16e5e9541b3de49e397a3d2caa3212db25487648 (patch)
tree9d1cc82dc037db865181a6742eade6d866803cd9 /examples/idle.c
parent685a5a11a9f6305f7479550247b333ffdf036d73 (diff)
Add -Wmissing-prototypes
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
Diffstat (limited to 'examples/idle.c')
-rw-r--r--examples/idle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/idle.c b/examples/idle.c
index 0641d4fd..0f3a7f80 100644
--- a/examples/idle.c
+++ b/examples/idle.c
@@ -52,7 +52,7 @@ static const struct org_kde_kwin_idle_timeout_listener idle_timer_listener = {
.resumed = handle_resume,
};
-int parse_args(int argc, char *argv[]) {
+static int parse_args(int argc, char *argv[]) {
int c;
while ((c = getopt(argc, argv, "c:hs:t:")) != -1) {
switch(c)
@@ -81,7 +81,7 @@ int parse_args(int argc, char *argv[]) {
return 0;
}
-void *simulate_activity(void *data) {
+static void *simulate_activity(void *data) {
sleep(simulate_activity_timeout);
fprintf(stdout, "simulate user activity\n");
struct thread_args *arg = data;
@@ -90,7 +90,7 @@ void *simulate_activity(void *data) {
return NULL;
}
-void *close_program(void *data) {
+static void *close_program(void *data) {
sleep(close_timeout);
struct thread_args *arg = data;
org_kde_kwin_idle_timeout_release(arg->timer);
@@ -100,7 +100,7 @@ void *close_program(void *data) {
return NULL;
}
-void *main_loop(void *data) {
+static void *main_loop(void *data) {
struct wl_display *display = data;
while (wl_display_dispatch(display) != -1) {
;