diff --git a/src/api.c b/src/api.c index d896d8df..69b2f228 100644 --- a/src/api.c +++ b/src/api.c @@ -59,6 +59,8 @@ static int call(int (*action)(svc_t *, void *), char *buf, size_t len) static int stop(svc_t *svc, void *user_data) { + (void)user_data; + if (!svc) return 1; @@ -72,6 +74,8 @@ static int stop(svc_t *svc, void *user_data) static int start(svc_t *svc, void *user_data) { + (void)user_data; + if (!svc) return 1; @@ -105,6 +109,8 @@ static int restart(svc_t *svc, void *user_data) static int reload(svc_t *svc, void *user_data) { + (void)user_data; + if (!svc) return 1; @@ -149,6 +155,8 @@ static int missing(char *job, char *id, void *user_data) { char buf[20]; + (void)user_data; + if (!job) job = ""; if (!id) @@ -228,6 +236,8 @@ struct wq emergency = { .cb = bypass_shutdown }; static void bypass_shutdown(void *unused) { + (void)unused; + cprintf("TIMEOUT TIMEOUT SHUTTING DOWN NOW!!\n"); do_shutdown(halt); } @@ -332,6 +342,8 @@ static void api_cb(uev_t *w, void *arg, int events) int sd, lvl; svc_t *svc; + (void)arg; + if (UEV_ERROR == events) { dbg("%s(): api socket %d invalid.", __func__, w->fd); goto error; diff --git a/src/cgroup.c b/src/cgroup.c index ca886d7b..0c7e3155 100644 --- a/src/cgroup.c +++ b/src/cgroup.c @@ -267,6 +267,7 @@ static void cgroup_events_cb(uev_t *w, void *arg, int events) ssize_t sz; size_t off; + (void)arg; if (UEV_ERROR == events) { dbg("%s(): inotify socket %d invalid.", __func__, w->fd); return; diff --git a/src/cond-w.c b/src/cond-w.c index facc57c9..faf72e2f 100644 --- a/src/cond-w.c +++ b/src/cond-w.c @@ -202,6 +202,9 @@ static int do_delete(const char *fpath, const struct stat *sb, int tflag, struct { const char *cond, *ptr; + (void)sb; + (void)tflag; + if (ftw->level == 0) return 1; @@ -390,6 +393,8 @@ static int do_assert(const char *fpath, const struct stat *sb, int tflg, struct { char *nm; + (void)sb; + if (ftw->level == 0) return 1; diff --git a/src/conf.c b/src/conf.c index ea2e4f3d..6f277b2a 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1562,6 +1562,8 @@ static int conf_iwatch_read(int fd) static void conf_cb(uev_t *w, void *arg, int events) { + (void)arg; + if (UEV_ERROR == events) { dbg("%s(): iwatch socket %d invalid.", __func__, w->fd); return; diff --git a/src/devmon.c b/src/devmon.c index fda09605..2960757b 100644 --- a/src/devmon.c +++ b/src/devmon.c @@ -164,6 +164,8 @@ static void devmon_scandir(struct iwatch *iw, char *dir, int len) size_t i; int rc; + (void)iw; + snprintf(path, sizeof(path), "%s/*", dir); rc = glob(path, GLOB_NOSORT, NULL, &gl); if (rc && rc != GLOB_NOMATCH) @@ -207,6 +209,8 @@ static void devmon_cb(uev_t *w, void *arg, int events) ssize_t sz; size_t off; + (void)arg; + sz = read(w->fd, ev_buf, sizeof(ev_buf) - 1); if (sz <= 0) { err(1, "invalid inotify event"); diff --git a/src/helpers.c b/src/helpers.c index a15d66af..9129679c 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -293,6 +293,8 @@ static size_t print_timestamp(char *buf, size_t len) sscanf(buf, "%f %f", &stamp, &dummy); return snprintf(buf, len, "[ %.6f ]", stamp); #else + (void)buf; + (void)len; return 0; #endif } diff --git a/src/plugin.c b/src/plugin.c index 17d63afe..a155d5d9 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -320,6 +320,8 @@ static int init_plugins(uev_ctx_t *ctx) plugin_t *p, *tmp; int fail = 0; + (void)ctx; + PLUGIN_ITERATOR(p, tmp) { if (plugin_io_init(p)) fail++; diff --git a/src/service.c b/src/service.c index 83d9aa60..f14378a3 100644 --- a/src/service.c +++ b/src/service.c @@ -2823,6 +2823,7 @@ void service_step_all(int types) void service_worker(void *unused) { + (void)unused; service_step_all(SVC_TYPE_RESPAWN | SVC_TYPE_RUNTASK); } diff --git a/src/sig.c b/src/sig.c index ffbe7faf..080ea305 100644 --- a/src/sig.c +++ b/src/sig.c @@ -260,6 +260,7 @@ static int status_cb(int pid, void *data) { int *has_proc = (int *)data; + (void)pid; *has_proc = 1; return 1; @@ -425,6 +426,8 @@ void do_shutdown(shutop_t op) */ static void sighup_cb(uev_t *w, void *arg, int events) { + (void)arg; + dbg("..."); if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); @@ -451,6 +454,9 @@ static void sighup_cb(uev_t *w, void *arg, int events) */ static void sigint_cb(uev_t *w, void *arg, int events) { + (void)w; + (void)arg; + dbg("..."); if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); @@ -467,6 +473,9 @@ static void sigint_cb(uev_t *w, void *arg, int events) */ static void sigpwr_cb(uev_t *w, void *arg, int events) { + (void)w; + (void)arg; + dbg("..."); if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); @@ -481,6 +490,8 @@ static void sigpwr_cb(uev_t *w, void *arg, int events) */ static void sigusr1_cb(uev_t *w, void *arg, int events) { + (void)arg; + dbg("..."); if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); @@ -502,6 +513,9 @@ static void sigusr1_cb(uev_t *w, void *arg, int events) */ static void sigusr2_cb(uev_t *w, void *arg, int events) { + (void)w; + (void)arg; + dbg("..."); if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); @@ -522,6 +536,9 @@ static void sigusr2_cb(uev_t *w, void *arg, int events) */ static void sigterm_cb(uev_t *w, void *arg, int events) { + (void)w; + (void)arg; + dbg("..."); if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); @@ -545,6 +562,9 @@ static void sigchld_cb(uev_t *w, void *arg, int events) int status; pid_t pid; + (void)w; + (void)arg; + if (UEV_ERROR == events) { errx(1, "Unrecoverable error in signal watcher"); return; @@ -601,6 +621,9 @@ const char *sig_name(int signo) */ static void chld_handler(int sig, siginfo_t *info, void *ctx) { + (void)sig; + (void)info; + (void)ctx; /* NOP */ } diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 8bd0d34c..ab68e233 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -114,6 +114,9 @@ static int parse_mm(char *arg, int *major, int *minor) static int do_delete(const char *fpath, const struct stat *sb, int tflag, struct FTW *ftw) { + (void)sb; + (void)tflag; + if (ftw->level == 0) return 1;