From b3ddcfe1f75495bb47bf5eaba6333e4822eadae7 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 26 Feb 2009 15:51:54 +0000 Subject: Remove even more unneeded variable assignments. kern_time.c: - Unused variable `p'. kern_thr.c: - Variable `error' is always caught immediately, so no reason to initialize it. There is no way that error != 0 at the end of create_thread(). kern_sig.c: - Unused variable `code'. kern_synch.c: - `rval' is always assigned in all different cases. kern_rwlock.c: - `v' is always overwritten with RW_UNLOCKED further on. kern_malloc.c: - `size' is always initialized with the proper value before being used. kern_exit.c: - `error' is always caught and returned immediately. abort2() never returns a non-zero value. kern_exec.c: - `len' is always assigned inside the if-statement right below it. tty_info.c: - `td' is always overwritten by FOREACH_THREAD_IN_PROC(). Found by: LLVM's scan-build --- sys/kern/kern_time.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sys/kern/kern_time.c') diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 7ccbb6a..a8ecace 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1367,10 +1367,8 @@ realtimer_expire(void *arg) struct timespec cts, ts; struct timeval tv; struct itimer *it; - struct proc *p; it = (struct itimer *)arg; - p = it->it_proc; realtimer_clocktime(it->it_clockid, &cts); /* Only fire if time is reached. */ -- cgit v1.1