Mercurial > hg > Members > anatofuz > CbC_xv6
changeset 22:397e74cbf14e
fix warnings
author | mir3636 |
---|---|
date | Sat, 07 Apr 2018 19:05:00 +0900 |
parents | 45035047d186 |
children | ee58360d0e99 |
files | src/entry.S src/exec.c src/proc.c src/syscall.c src/tools/mkfs.c |
diffstat | 5 files changed, 32 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/src/entry.S Sat Apr 07 18:44:18 2018 +0900 +++ b/src/entry.S Sat Apr 07 19:05:00 2018 +0900 @@ -14,8 +14,8 @@ 1: CMP r1, r2 -# STMLTIA r1!, {r3} - STMIALT r1!, {r3} + STMLTIA r1!, {r3} +# STMIALT r1!, {r3} BLT 1b # initialize stack pointers for svc modes
--- a/src/exec.c Sat Apr 07 18:44:18 2018 +0900 +++ b/src/exec.c Sat Apr 07 19:05:00 2018 +0900 @@ -13,7 +13,7 @@ struct elfhdr elf; struct inode *ip; struct proghdr ph; - pde_t *pgdir; + pde_t *pgdir = 0; pde_t *oldpgdir; char *s; char *last; @@ -39,8 +39,6 @@ goto bad; } - pgdir = 0; - if ((pgdir = kpt_alloc()) == 0) { goto bad; }
--- a/src/proc.c Sat Apr 07 18:44:18 2018 +0900 +++ b/src/proc.c Sat Apr 07 19:05:00 2018 +0900 @@ -502,12 +502,12 @@ void procdump(void) { static char *states[] = { - [UNUSED] "unused", - [EMBRYO] "embryo", - [SLEEPING] "sleep ", - [RUNNABLE] "runble", - [RUNNING] "run ", - [ZOMBIE] "zombie" + [UNUSED] ="unused", + [EMBRYO] ="embryo", + [SLEEPING] ="sleep ", + [RUNNABLE] ="runble", + [RUNNING] ="run ", + [ZOMBIE] ="zombie" }; struct proc *p;
--- a/src/syscall.c Sat Apr 07 18:44:18 2018 +0900 +++ b/src/syscall.c Sat Apr 07 19:05:00 2018 +0900 @@ -116,27 +116,27 @@ extern int sys_uptime(void); static int (*syscalls[])(void) = { - [SYS_fork] sys_fork, - [SYS_exit] sys_exit, - [SYS_wait] sys_wait, - [SYS_pipe] sys_pipe, - [SYS_read] sys_read, - [SYS_kill] sys_kill, - [SYS_exec] sys_exec, - [SYS_fstat] sys_fstat, - [SYS_chdir] sys_chdir, - [SYS_dup] sys_dup, - [SYS_getpid] sys_getpid, - [SYS_sbrk] sys_sbrk, - [SYS_sleep] sys_sleep, - [SYS_uptime] sys_uptime, - [SYS_open] sys_open, - [SYS_write] sys_write, - [SYS_mknod] sys_mknod, - [SYS_unlink] sys_unlink, - [SYS_link] sys_link, - [SYS_mkdir] sys_mkdir, - [SYS_close] sys_close, + [SYS_fork] =sys_fork, + [SYS_exit] =sys_exit, + [SYS_wait] =sys_wait, + [SYS_pipe] =sys_pipe, + [SYS_read] =sys_read, + [SYS_kill] =sys_kill, + [SYS_exec] =sys_exec, + [SYS_fstat] =sys_fstat, + [SYS_chdir] =sys_chdir, + [SYS_dup] =sys_dup, + [SYS_getpid] =sys_getpid, + [SYS_sbrk] =sys_sbrk, + [SYS_sleep] =sys_sleep, + [SYS_uptime] =sys_uptime, + [SYS_open] =sys_open, + [SYS_write] =sys_write, + [SYS_mknod] =sys_mknod, + [SYS_unlink] =sys_unlink, + [SYS_link] =sys_link, + [SYS_mkdir] =sys_mkdir, + [SYS_close] =sys_close, }; void syscall(void)
--- a/src/tools/mkfs.c Sat Apr 07 18:44:18 2018 +0900 +++ b/src/tools/mkfs.c Sat Apr 07 19:05:00 2018 +0900 @@ -10,8 +10,9 @@ #include "fs.h" #include "stat.h" #include "param.h" - +#ifndef static_assert #define static_assert(a, b) do { switch (0) case 0: case (a): ; } while (0) +#endif int nblocks = 985; int nlog = LOGSIZE;