mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-28 08:44:06 +02:00
compile with warnings
This commit is contained in:
parent
7d1eb9348c
commit
bdd141cbdf
@ -15,10 +15,10 @@ C_FLAGS = \
|
|||||||
-std=c17 \
|
-std=c17 \
|
||||||
-Wall -Wextra -Wpedantic -Wconversion \
|
-Wall -Wextra -Wpedantic -Wconversion \
|
||||||
-pedantic -pedantic-errors \
|
-pedantic -pedantic-errors \
|
||||||
-Wno-unused-parameter \
|
-Wno-unused-parameter -Wno-format-zero-length \
|
||||||
|
|
||||||
L_FLAGS = -lm -pthread $(shell pkg-config sqlite3 openssl --libs)
|
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 =
|
F_FLAGS =
|
||||||
OPTIMIZATION =
|
OPTIMIZATION =
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
xc
|
-xc
|
||||||
-std=c17
|
-std=c17
|
||||||
-Wall
|
-Wall
|
||||||
-Wextra
|
-Wextra
|
||||||
|
@ -183,7 +183,11 @@ void http_ctx_respond(HttpCtx* ctx, int status, const char* body)
|
|||||||
|
|
||||||
string_push_str(&res, 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("\nResponse:");
|
||||||
puts(res.data);
|
puts(res.data);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
(fputs("\x1b[1;31mpanic\x1b[97m: ", stderr), fprintf(stderr, __VA_ARGS__), \
|
(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__, \
|
fprintf(stderr, "\x1b[0m\n\tin %s:%d\n\tat %s:%d\n", __func__, \
|
||||||
__LINE__, __FILE__, __LINE__), \
|
__LINE__, __FILE__, __LINE__), \
|
||||||
exit(1), 0)
|
exit(1), (void)0)
|
||||||
|
|
||||||
__attribute__((unused)) static inline void ___include_user(void)
|
__attribute__((unused)) static inline void ___include_user(void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user