Date: Sun, 3 Aug 2008 18:55:42 GMT From: Mateusz Guzik <mjguzik@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/126223: [patch] Unused `error' variable in kthread_add() Message-ID: <200808031855.m73Itgml010074@www.freebsd.org> Resent-Message-ID: <200808031900.m73J06t2060633@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808031855.m73Itgml010074>
