From nobody@FreeBSD.org  Sun Aug  3 18:55:42 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8BB83106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Aug 2008 18:55:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 7A5E98FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Aug 2008 18:55:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m73Itg9X010088
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 3 Aug 2008 18:55:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m73Itgml010074;
	Sun, 3 Aug 2008 18:55:42 GMT
	(envelope-from nobody)
Message-Id: <200808031855.m73Itgml010074@www.freebsd.org>
Date: Sun, 3 Aug 2008 18:55:42 GMT
From: Mateusz Guzik <mjguzik@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Unused `error' variable in kthread_add()
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         126223
>Category:       kern
>Synopsis:       [patch] Unused `error' variable in kthread_add()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    antoine
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 03 19:00:06 UTC 2008
>Closed-Date:    Sun Aug 03 21:11:46 UTC 2008
>Last-Modified:  Sun Aug 03 21:11:46 UTC 2008
>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:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/126223: commit references a PR
Date: Sun,  3 Aug 2008 21:07:45 +0000 (UTC)

 antoine     2008-08-03 21:07:19 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/kern             kern_kthread.c 
   Log:
   SVN rev 181263 on 2008-08-03 21:07:19Z by antoine
   
   Kill a dead variable
   
   PR:             126223
   Submitted by:   Mateusz Guzik
   
   Revision  Changes    Path
   1.47      +0 -2      src/sys/kern/kern_kthread.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: antoine 
State-Changed-When: Sun Aug 3 21:10:59 UTC 2008 
State-Changed-Why:  
Patch committed, thanks for the report! 


Responsible-Changed-From-To: freebsd-bugs->antoine 
Responsible-Changed-By: antoine 
Responsible-Changed-When: Sun Aug 3 21:10:59 UTC 2008 
Responsible-Changed-Why:  
Patch committed, thanks for the report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126223 
>Unformatted:
