kern/126223: [patch] Unused `error' variable in kthread_add()
Mateusz Guzik
mjguzik at gmail.com
Sun Aug 3 19:00:13 UTC 2008
>Number: 126223
>Category: kern
>Synopsis: [patch] Unused `error' variable in kthread_add()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 03 19:00:06 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Mateusz Guzik
>Release: 8.0-CURRENT
>Organization:
>Environment:
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #24: Wed Jul 23 01:21:38 CEST 2008 f at eternal:/usr/obj/usr/src/sys/ETERNAL i386
>Description:
Variable `error' is declared and set to 0, but not used later.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- sys/kern/kern_kthread.c.orig 2008-08-03 20:35:18.000000000 +0200
+++ sys/kern/kern_kthread.c 2008-08-03 20:35:33.000000000 +0200
@@ -241,16 +241,14 @@
kthread_add(void (*func)(void *), void *arg, struct proc *p,
struct thread **newtdp, int flags, int pages, const char *fmt, ...)
{
va_list ap;
struct thread *newtd, *oldtd;
- int error;
if (!proc0.p_stats)
panic("kthread_add called too soon");
- error = 0;
/* If no process supplied, put it on proc0 */
if (p == NULL) {
p = &proc0;
oldtd = &thread0;
} else {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list