summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--activitypub.c2
-rw-r--r--html.c3
-rw-r--r--httpd.c6
-rw-r--r--mastoapi.c13
-rw-r--r--webfinger.c2
6 files changed, 27 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 710d61f..7dbd9e7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
1PREFIX=/usr/local 1PREFIX=/usr/local
2PREFIX_MAN=$(PREFIX)/man 2PREFIX_MAN=$(PREFIX)/man
3CFLAGS?=-g -Wall 3CFLAGS?=-g -Wall -Wextra
4 4
5all: snac 5all: snac
6 6
diff --git a/activitypub.c b/activitypub.c
index 86d33df..c25b733 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1524,6 +1524,8 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path,
1524 char **body, int *b_size, char **ctype) 1524 char **body, int *b_size, char **ctype)
1525/* processes an input message */ 1525/* processes an input message */
1526{ 1526{
1527 (void)b_size;
1528
1527 int status = 202; /* accepted */ 1529 int status = 202; /* accepted */
1528 char *i_ctype = xs_dict_get(req, "content-type"); 1530 char *i_ctype = xs_dict_get(req, "content-type");
1529 snac snac; 1531 snac snac;
diff --git a/html.c b/html.c
index 3ba7930..3ebe70d 100644
--- a/html.c
+++ b/html.c
@@ -1551,6 +1551,9 @@ int html_post_handler(const xs_dict *req, const char *q_path,
1551 char *payload, int p_size, 1551 char *payload, int p_size,
1552 char **body, int *b_size, char **ctype) 1552 char **body, int *b_size, char **ctype)
1553{ 1553{
1554 (void)p_size;
1555 (void)ctype;
1556
1554 int status = 0; 1557 int status = 0;
1555 snac snac; 1558 snac snac;
1556 char *uid, *p_path; 1559 char *uid, *p_path;
diff --git a/httpd.c b/httpd.c
index 5520457..fe93727 100644
--- a/httpd.c
+++ b/httpd.c
@@ -49,6 +49,8 @@ int server_get_handler(xs_dict *req, char *q_path,
49{ 49{
50 int status = 0; 50 int status = 0;
51 51
52 (void)req;
53
52 /* is it the server root? */ 54 /* is it the server root? */
53 if (*q_path == '\0') { 55 if (*q_path == '\0') {
54 /* try to open greeting.html */ 56 /* try to open greeting.html */
@@ -285,6 +287,8 @@ static jmp_buf on_break;
285 287
286void term_handler(int s) 288void term_handler(int s)
287{ 289{
290 (void)s;
291
288 longjmp(on_break, 1); 292 longjmp(on_break, 1);
289} 293}
290 294
@@ -401,6 +405,8 @@ static void *background_thread(void *arg)
401{ 405{
402 time_t purge_time; 406 time_t purge_time;
403 407
408 (void)arg;
409
404 /* first purge time */ 410 /* first purge time */
405 purge_time = time(NULL) + 10 * 60; 411 purge_time = time(NULL) + 10 * 60;
406 412
diff --git a/mastoapi.c b/mastoapi.c
index c51c933..2413edb 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -175,6 +175,8 @@ const char *login_page = ""
175int oauth_get_handler(const xs_dict *req, const char *q_path, 175int oauth_get_handler(const xs_dict *req, const char *q_path,
176 char **body, int *b_size, char **ctype) 176 char **body, int *b_size, char **ctype)
177{ 177{
178 (void)b_size;
179
178 if (!xs_startswith(q_path, "/oauth/")) 180 if (!xs_startswith(q_path, "/oauth/"))
179 return 0; 181 return 0;
180 182
@@ -227,6 +229,9 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
227 const char *payload, int p_size, 229 const char *payload, int p_size,
228 char **body, int *b_size, char **ctype) 230 char **body, int *b_size, char **ctype)
229{ 231{
232 (void)p_size;
233 (void)b_size;
234
230 if (!xs_startswith(q_path, "/oauth/")) 235 if (!xs_startswith(q_path, "/oauth/"))
231 return 0; 236 return 0;
232 237
@@ -815,6 +820,8 @@ int process_auth_token(snac *snac, const xs_dict *req)
815int mastoapi_get_handler(const xs_dict *req, const char *q_path, 820int mastoapi_get_handler(const xs_dict *req, const char *q_path,
816 char **body, int *b_size, char **ctype) 821 char **body, int *b_size, char **ctype)
817{ 822{
823 (void)b_size;
824
818 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/")) 825 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
819 return 0; 826 return 0;
820 827
@@ -1474,6 +1481,9 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
1474 const char *payload, int p_size, 1481 const char *payload, int p_size,
1475 char **body, int *b_size, char **ctype) 1482 char **body, int *b_size, char **ctype)
1476{ 1483{
1484 (void)p_size;
1485 (void)b_size;
1486
1477 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/")) 1487 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
1478 return 0; 1488 return 0;
1479 1489
@@ -1898,6 +1908,9 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path,
1898 const char *payload, int p_size, 1908 const char *payload, int p_size,
1899 char **body, int *b_size, char **ctype) 1909 char **body, int *b_size, char **ctype)
1900{ 1910{
1911 (void)p_size;
1912 (void)b_size;
1913
1901 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/")) 1914 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
1902 return 0; 1915 return 0;
1903 1916
diff --git a/webfinger.c b/webfinger.c
index f56b6f2..765c469 100644
--- a/webfinger.c
+++ b/webfinger.c
@@ -104,6 +104,8 @@ int webfinger_get_handler(d_char *req, char *q_path,
104{ 104{
105 int status; 105 int status;
106 106
107 (void)b_size;
108
107 if (strcmp(q_path, "/.well-known/webfinger") != 0) 109 if (strcmp(q_path, "/.well-known/webfinger") != 0)
108 return 0; 110 return 0;
109 111