compile with warnings

This commit is contained in:
SimonFJ20 2025-03-12 14:13:51 +01:00
parent 7d1eb9348c
commit bdd141cbdf
4 changed files with 9 additions and 5 deletions

View File

@ -15,10 +15,10 @@ C_FLAGS = \
-std=c17 \
-Wall -Wextra -Wpedantic -Wconversion \
-pedantic -pedantic-errors \
-Wno-unused-parameter \
-Wno-unused-parameter -Wno-format-zero-length \
L_FLAGS = -lm -pthread $(shell pkg-config sqlite3 openssl --libs)
C_FLAGS = $(shell pkg-config sqlite3 openssl --cflags)
C_FLAGS += $(shell pkg-config sqlite3 openssl --cflags)
F_FLAGS =
OPTIMIZATION =

View File

@ -1,4 +1,4 @@
xc
-xc
-std=c17
-Wall
-Wextra

View File

@ -183,7 +183,11 @@ void http_ctx_respond(HttpCtx* ctx, int status, const char* body)
string_push_str(&res, body);
write(ctx->client->file, res.data, res.size);
ssize_t bytes_written = write(ctx->client->file, res.data, res.size);
if (bytes_written != (ssize_t)res.size) {
fprintf(stderr, "error: could not send response\n");
}
puts("\nResponse:");
puts(res.data);

View File

@ -7,7 +7,7 @@
(fputs("\x1b[1;31mpanic\x1b[97m: ", stderr), fprintf(stderr, __VA_ARGS__), \
fprintf(stderr, "\x1b[0m\n\tin %s:%d\n\tat %s:%d\n", __func__, \
__LINE__, __FILE__, __LINE__), \
exit(1), 0)
exit(1), (void)0)
__attribute__((unused)) static inline void ___include_user(void)
{