From: Petr Štetiar Date: Sun, 11 Oct 2020 09:04:05 +0000 (+0200) Subject: Fix clang compiler errors X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a0ed2c9a7a725781f8d3d5cb3524665273f0dd68;p=project%2Fcgi-io.git Fix clang compiler errors 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 --- 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");