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:
@@ -3,6 +3,7 @@
|
||||
#include <BAN/Optional.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
BAN::Optional<uint64_t> parse_u64(const uint8_t*& data, size_t data_size)
|
||||
@@ -86,7 +87,7 @@ BAN::ErrorOr<BAN::UniqPtr<Image>> load_netbpm(const void* mmap_addr, size_t size
|
||||
return BAN::Error::from_errno(EINVAL);
|
||||
}
|
||||
|
||||
printf("Netbpm image %llux%llu\n", *width, *height);
|
||||
printf("Netbpm image %" PRIuPTR "x%" PRIuPTR "\n", *width, *height);
|
||||
|
||||
BAN::Vector<Image::Color> bitmap;
|
||||
TRY(bitmap.resize(*width * *height));
|
||||
|
||||
Reference in New Issue
Block a user