[PATCH cgi-io 03/12] Fix clang compiler errors
Petr Štetiar
ynezz at true.cz
Mon Oct 12 08:37:09 EDT 2020
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 <ynezz at true.cz>
---
main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/main.c b/main.c
index 64f474f9283d..53c672836294 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");
More information about the openwrt-devel
mailing list