LibC+userspace: Make everything compile with -Wall -Wextra -Werror

I added -Wall -Wextra -Werror as public compile flags to libc. Now
everything in userspace in compiled using these flags. I made all
necessary changes to allow compilation to work.

Only exception is execvp which has a large stack usage. Maybe it
should use malloc for the buffer but posix allows ENOMEM only when
kernel is out of memory... This can be fixed when fexecve is
implemented and there is no need for absolute path.
This commit is contained in:
2023-12-10 19:20:14 +02:00
parent f077e17b2a
commit 00d57d783e
22 changed files with 63 additions and 57 deletions

View File

@@ -16,7 +16,7 @@ int main(int argc, char** argv)
uint8_t buffer[1024];
while (size_t ret = fread(buffer, 1, sizeof(buffer), fp))
for (int j = 0; j < ret; j++)
for (size_t j = 0; j < ret; j++)
sum += buffer[j];
if (ferror(fp))