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:
@@ -54,13 +54,13 @@ bool delete_recursive(const char* path)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void usage(const char* argv0, int ret)
|
||||
{
|
||||
FILE* out = (ret == 0) ? stdout : stderr;
|
||||
fprintf(out, "usage: %s [OPTIONS]... FILE...\n");
|
||||
fprintf(out, "usage: %s [OPTIONS]... FILE...\n", argv0);
|
||||
fprintf(out, " remove each FILE\n");
|
||||
fprintf(out, "OPTIONS:\n");
|
||||
fprintf(out, " -r remove directories and their contents recursively\n");
|
||||
|
||||
Reference in New Issue
Block a user