From a0ed2c9a7a725781f8d3d5cb3524665273f0dd68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Sun, 11 Oct 2020 11:04:05 +0200 Subject: [PATCH] Fix clang compiler errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes following errors as reported by clang compilers: cgi-io/src/main.c:723:12: error: unused variable 'post' [-Werror,-Wunused-variable] autochar *post = postdecode(fields, 4); ^ cgi-io/src/main.c:814:12: error: unused variable 'post' [-Werror,-Wunused-variable] autochar *post = postdecode(fields, 1); ^ cgi-io/src/main.c:996:12: error: unused variable 'post' [-Werror,-Wunused-variable] autochar *post = postdecode(fields, 4); Signed-off-by: Petr Å tetiar --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 64f474f..53c6728 100644 --- a/main.c +++ b/main.c @@ -721,6 +721,7 @@ main_download(int argc, char **argv) int rfd; autochar *post = postdecode(fields, 4); + (void) post; if (!fields[1] || !session_access(fields[1], "cgi-io", "download", "read")) return failure(403, 0, "Download permission denied"); @@ -812,6 +813,7 @@ main_backup(int argc, char **argv) char *fields[] = { "sessionid", NULL }; autochar *post = postdecode(fields, 1); + (void) post; if (!fields[1] || !session_access(fields[1], "cgi-io", "backup", "read")) return failure(403, 0, "Backup permission denied"); @@ -999,6 +1001,7 @@ main_exec(int argc, char **argv) pid_t pid; autochar *post = postdecode(fields, 4); + (void) post; if (!fields[1] || !session_access(fields[1], "cgi-io", "exec", "read")) return failure(403, 0, "Exec permission denied"); -- 2.30.2