mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
Fix all current build warnings in the userland.
This commit is contained in:
parent
e9cdb6bb9b
commit
3e0a0dd7ed
12 changed files with 42 additions and 25 deletions
|
@ -1,8 +1,10 @@
|
|||
#include <LibC/time.h>
|
||||
#include <LibC/stdio.h>
|
||||
|
||||
int main(int c, char** v)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
time_t now = time(nullptr);
|
||||
printf("%u\n", now);
|
||||
return 0;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
printf("Testing fork()...\n");
|
||||
pid_t pid = fork();
|
||||
if (!pid) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
printf("Testing fork()...\n");
|
||||
pid_t pid = fork();
|
||||
if (!pid) {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include <LibC/unistd.h>
|
||||
#include <LibC/stdio.h>
|
||||
#include <LibC/errno.h>
|
||||
#include <LibC/string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int c, char** v)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
char buffer[HOST_NAME_MAX];
|
||||
int rc = gethostname(buffer, sizeof(buffer));
|
||||
if (rc < 0) {
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
#include <grp.h>
|
||||
#include <alloca.h>
|
||||
|
||||
int main(int c, char** v)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
uid_t uid = getuid();
|
||||
gid_t gid = getgid();
|
||||
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
#include <LibC/errno.h>
|
||||
#include <LibC/string.h>
|
||||
|
||||
int main(int c, char** v)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
bool colorize = true;
|
||||
|
||||
DIR* dirp = opendir(".");
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#include <LibC/stdio.h>
|
||||
#include <LibC/unistd.h>
|
||||
|
||||
int main(int c, char** v)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
int fd = open("/proc/mm", O_RDONLY);
|
||||
if (fd == -1) {
|
||||
perror("failed to open /proc/mm");
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#include <LibC/stdio.h>
|
||||
#include <LibC/unistd.h>
|
||||
|
||||
int main(int c, char** v)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
int fd = open("/proc/summary", O_RDONLY);
|
||||
if (fd == -1) {
|
||||
perror("failed to open /proc/summary");
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#include <LibC/stdio.h>
|
||||
#include <LibC/unistd.h>
|
||||
#include <LibC/process.h>
|
||||
#include <LibC/errno.h>
|
||||
#include <LibC/string.h>
|
||||
#include <LibC/stdlib.h>
|
||||
#include <LibC/utsname.h>
|
||||
#include <LibC/pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <process.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <utsname.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <signal.h>
|
||||
#include <AK/FileSystemPath.h>
|
||||
|
@ -43,7 +43,7 @@ void did_receive_signal(int signum)
|
|||
g_got_signal = true;
|
||||
}
|
||||
|
||||
void handle_sigint(int signum)
|
||||
void handle_sigint(int)
|
||||
{
|
||||
printf("Interrupt received by sh\n");
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ static int sh_wt(int, const char**)
|
|||
{
|
||||
const char* rodata_ptr = "foo";
|
||||
printf("Writing to rodata=%p...\n", rodata_ptr);
|
||||
*(char*)rodata_ptr = 0;
|
||||
*const_cast<char*>(rodata_ptr) = 0;
|
||||
|
||||
char* text_ptr = (char*)sh_fef;
|
||||
printf("Writing to text=%p...\n", text_ptr);
|
||||
|
@ -141,7 +141,6 @@ close_it:
|
|||
|
||||
static int sh_mp(int, const char**)
|
||||
{
|
||||
int rc;
|
||||
int fd = open("/kernel.map", O_RDONLY);
|
||||
if (fd < 0) {
|
||||
perror("open(/kernel.map)");
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
printf("Counting to 100000: \033[s");
|
||||
for (unsigned i = 0; i <= 100000; ++i) {
|
||||
printf("\033[u\033[s%u", i);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <LibC/stdio.h>
|
||||
#include <LibC/unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <LibC/utsname.h>
|
||||
#include <LibC/stdio.h>
|
||||
#include <utsname.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue