diff options
author | 2016-03-29 12:04:26 +0000 | |
---|---|---|
committer | 2016-03-29 12:04:26 +0000 | |
commit | 1c8081428201884cf21893c373c9830641d862d4 (patch) | |
tree | 632cf1cde1b1b549693fa24f8aefa5ab58c21c8e | |
parent | remove dead stores and unused variables (diff) | |
download | wireguard-openbsd-1c8081428201884cf21893c373c9830641d862d4.tar.xz wireguard-openbsd-1c8081428201884cf21893c373c9830641d862d4.zip |
Remove dead assignments and now unused variables.
Found by LLVM/Clang Static Analyzer.
ok mpi@ stefan@
-rw-r--r-- | sys/uvm/uvm_anon.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_fault.c | 5 | ||||
-rw-r--r-- | sys/uvm/uvm_mmap.c | 5 |
3 files changed, 3 insertions, 11 deletions
diff --git a/sys/uvm/uvm_anon.c b/sys/uvm/uvm_anon.c index 2b17264b6ee..e245ecf623c 100644 --- a/sys/uvm/uvm_anon.c +++ b/sys/uvm/uvm_anon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_anon.c,v 1.44 2015/08/21 16:04:35 visa Exp $ */ +/* $OpenBSD: uvm_anon.c,v 1.45 2016/03/29 12:04:26 chl Exp $ */ /* $NetBSD: uvm_anon.c,v 1.10 2000/11/25 06:27:59 chs Exp $ */ /* @@ -148,7 +148,6 @@ boolean_t uvm_anon_pagein(struct vm_anon *anon) { struct vm_page *pg; - struct uvm_object *uobj; int rv; rv = uvmfault_anonget(NULL, NULL, anon); @@ -177,7 +176,6 @@ uvm_anon_pagein(struct vm_anon *anon) * mark it as dirty, clear its swslot and un-busy it. */ pg = anon->an_page; - uobj = pg->uobject; uvm_swap_free(anon->an_swslot, 1); anon->an_swslot = 0; atomic_clearbits_int(&pg->pg_flags, PG_CLEAN); diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index 99d270ccdee..a6858c3e157 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_fault.c,v 1.88 2016/03/07 18:44:00 naddy Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.89 2016/03/29 12:04:26 chl Exp $ */ /* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */ /* @@ -1254,11 +1254,8 @@ int uvm_fault_wire(vm_map_t map, vaddr_t start, vaddr_t end, vm_prot_t access_type) { vaddr_t va; - pmap_t pmap; int rv; - pmap = vm_map_pmap(map); - /* * now fault it in a page at a time. if the fault fails then we have * to undo what we have done. note that in uvm_fault PROT_NONE diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index f1daa09b130..a04203a78a4 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.123 2016/03/09 16:45:43 deraadt Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.124 2016/03/29 12:04:26 chl Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -124,7 +124,6 @@ sys_mquery(struct proc *p, void *v, register_t *retval) syscallarg(off_t) pos; } */ *uap = v; struct file *fp; - struct uvm_object *uobj; voff_t uoff; int error; vaddr_t vaddr; @@ -147,11 +146,9 @@ sys_mquery(struct proc *p, void *v, register_t *retval) if (fd >= 0) { if ((error = getvnode(p, fd, &fp)) != 0) return (error); - uobj = &((struct vnode *)fp->f_data)->v_uvm->u_obj; uoff = SCARG(uap, pos); } else { fp = NULL; - uobj = NULL; uoff = UVM_UNKNOWN_OFFSET; } |