diff --git a/src/backends/redis.c b/src/backends/redis.c index 1b17c83..b61e60f 100644 --- a/src/backends/redis.c +++ b/src/backends/redis.c @@ -222,7 +222,9 @@ bool unban(cfg_t *cfg, const char *ip) { assert(cfg != NULL); - (void)(ip); /* suppress warning for unused variable 'ip' */ + (void)(cfg); /* suppress warning for unused variable 'ip' */ + (void)(ip); /* suppress warning for unused variable 'ip' */ + return true; } @@ -230,7 +232,9 @@ bool check(cfg_t *cfg, const char *ip) { assert(cfg != NULL); - (void)(ip); /* suppress warning for unused variable 'ip' */ + (void)(cfg); /* suppress warning for unused variable 'ip' */ + (void)(ip); /* suppress warning for unused variable 'ip' */ + return false; } diff --git a/src/client.c b/src/client.c index 00998a5..2493ea4 100644 --- a/src/client.c +++ b/src/client.c @@ -117,7 +117,9 @@ int main(int argc, char *argv[]) { SA_REGISTER(SIGINT, &signal_handler); /* prepare client side of socket */ - mkstemp(opts.csocket_cpath); + ret = mkstemp(opts.csocket_cpath); + if (ret >= 0) + close(ret); /* suppress compiler warning */ unlink(opts.csocket_cpath); /* remove regular file created by mkstemp() */ if ((opts.csocket = f2b_csocket_connect(opts.csocket_spath, opts.csocket_cpath)) <= 0) diff --git a/src/sources/files.c b/src/sources/files.c index 6b208e7..5b46fa0 100644 --- a/src/sources/files.c +++ b/src/sources/files.c @@ -126,7 +126,12 @@ config(cfg_t *cfg, const char *key, const char *value) { assert(cfg != NULL); assert(key != NULL); assert(value != NULL); + /* no options */ + (void)(cfg); /* suppress warning for unused variable 'ip' */ + (void)(key); /* suppress warning for unused variable 'ip' */ + (void)(value); /* suppress warning for unused variable 'ip' */ + return false; } diff --git a/t/t_cmd.c b/t/t_cmd.c index 573a34b..708ff53 100644 --- a/t/t_cmd.c +++ b/t/t_cmd.c @@ -5,6 +5,8 @@ int main() { char buf[1024]; const char *line; + UNUSED(line); + buf[0] = '\0'; f2b_cmd_append_arg(buf, sizeof(buf), "42"); assert(strcmp(buf, "42\n") == 0); diff --git a/t/t_statefile.c b/t/t_statefile.c index 06f081a..2f2ff90 100644 --- a/t/t_statefile.c +++ b/t/t_statefile.c @@ -11,6 +11,7 @@ int main() { struct stat st; time_t banned_at = 0, release_at = 0; + UNUSED(res); UNUSED(list); snprintf(jailname, sizeof(jailname), "%lu", time(NULL)); /* gen unique jailname */