mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Added -Wextra to C flags.
This commit is contained in:
parent
753eadfd17
commit
185aac2387
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
|||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
PREFIX_MAN=$(PREFIX)/man
|
PREFIX_MAN=$(PREFIX)/man
|
||||||
CFLAGS?=-g -Wall
|
CFLAGS?=-g -Wall -Wextra
|
||||||
|
|
||||||
all: snac
|
all: snac
|
||||||
|
|
||||||
|
@ -1524,6 +1524,8 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path,
|
|||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
/* processes an input message */
|
/* processes an input message */
|
||||||
{
|
{
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
int status = 202; /* accepted */
|
int status = 202; /* accepted */
|
||||||
char *i_ctype = xs_dict_get(req, "content-type");
|
char *i_ctype = xs_dict_get(req, "content-type");
|
||||||
snac snac;
|
snac snac;
|
||||||
|
3
html.c
3
html.c
@ -1551,6 +1551,9 @@ int html_post_handler(const xs_dict *req, const char *q_path,
|
|||||||
char *payload, int p_size,
|
char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
|
(void)p_size;
|
||||||
|
(void)ctype;
|
||||||
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
snac snac;
|
snac snac;
|
||||||
char *uid, *p_path;
|
char *uid, *p_path;
|
||||||
|
6
httpd.c
6
httpd.c
@ -49,6 +49,8 @@ int server_get_handler(xs_dict *req, char *q_path,
|
|||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
|
(void)req;
|
||||||
|
|
||||||
/* is it the server root? */
|
/* is it the server root? */
|
||||||
if (*q_path == '\0') {
|
if (*q_path == '\0') {
|
||||||
/* try to open greeting.html */
|
/* try to open greeting.html */
|
||||||
@ -285,6 +287,8 @@ static jmp_buf on_break;
|
|||||||
|
|
||||||
void term_handler(int s)
|
void term_handler(int s)
|
||||||
{
|
{
|
||||||
|
(void)s;
|
||||||
|
|
||||||
longjmp(on_break, 1);
|
longjmp(on_break, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,6 +405,8 @@ static void *background_thread(void *arg)
|
|||||||
{
|
{
|
||||||
time_t purge_time;
|
time_t purge_time;
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
/* first purge time */
|
/* first purge time */
|
||||||
purge_time = time(NULL) + 10 * 60;
|
purge_time = time(NULL) + 10 * 60;
|
||||||
|
|
||||||
|
13
mastoapi.c
13
mastoapi.c
@ -175,6 +175,8 @@ const char *login_page = ""
|
|||||||
int oauth_get_handler(const xs_dict *req, const char *q_path,
|
int oauth_get_handler(const xs_dict *req, const char *q_path,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
if (!xs_startswith(q_path, "/oauth/"))
|
if (!xs_startswith(q_path, "/oauth/"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -227,6 +229,9 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
|
|||||||
const char *payload, int p_size,
|
const char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
|
(void)p_size;
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
if (!xs_startswith(q_path, "/oauth/"))
|
if (!xs_startswith(q_path, "/oauth/"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -815,6 +820,8 @@ int process_auth_token(snac *snac, const xs_dict *req)
|
|||||||
int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
|
if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1474,6 +1481,9 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
|
|||||||
const char *payload, int p_size,
|
const char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
|
(void)p_size;
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
|
if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1898,6 +1908,9 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path,
|
|||||||
const char *payload, int p_size,
|
const char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
|
(void)p_size;
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
|
if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -104,6 +104,8 @@ int webfinger_get_handler(d_char *req, char *q_path,
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
(void)b_size;
|
||||||
|
|
||||||
if (strcmp(q_path, "/.well-known/webfinger") != 0)
|
if (strcmp(q_path, "/.well-known/webfinger") != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user