From nobody@FreeBSD.org  Wed Nov 24 17:42:16 2010
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 5D14F106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Nov 2010 17:42:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BE2D8FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Nov 2010 17:42:16 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oAOHgGYE052956
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Nov 2010 17:42:16 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oAOHgGh3052955;
	Wed, 24 Nov 2010 17:42:16 GMT
	(envelope-from nobody)
Message-Id: <201011241742.oAOHgGh3052955@red.freebsd.org>
Date: Wed, 24 Nov 2010 17:42:16 GMT
From: Henning Petersen <henning.petersen@t-online.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Remove unused variables.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152551
>Category:       bin
>Synopsis:       [libc] Remove unused variables.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 24 17:50:09 UTC 2010
>Closed-Date:    Sun Mar 11 22:08:05 UTC 2012
>Last-Modified:  Sun Mar 11 22:10:13 UTC 2012
>Originator:     Henning Petersen
>Release:        FreeBSD-current
>Organization:
>Environment:
>Description:
Remove unused variables.
>How-To-Repeat:

>Fix:
--- lib/libc/stdio/printf-pos.c	2 Mar 2009 04:07:58 -0000	1.6
+++ lib/libc/stdio/printf-pos.c	17 Mar 2010 09:16:45 -0000
@@ -248,7 +248,6 @@
 	int n;			/* handy integer (short term usage) */
 	int error;
 	int flags;		/* flags as above */
-	int width;		/* width from format (%8d), or 0 */
 	struct typetable types;	/* table of types */
 
 	fmt = (char *)fmt0;
@@ -266,7 +265,6 @@
 		fmt++;		/* skip over '%' */
 
 		flags = 0;
-		width = 0;
 
 rflag:		ch = *fmt++;
 reswitch:	switch (ch) {
@@ -304,7 +302,6 @@
 				types.nextarg = n;
 				goto rflag;
 			}
-			width = n;
 			goto reswitch;
 #ifndef NO_FLOATING_POINT
 		case 'L':
@@ -439,7 +436,6 @@
 	int n;			/* handy integer (short term usage) */
 	int error;
 	int flags;		/* flags as above */
-	int width;		/* width from format (%8d), or 0 */
 	struct typetable types;	/* table of types */
 
 	fmt = (wchar_t *)fmt0;
@@ -457,7 +453,6 @@
 		fmt++;		/* skip over '%' */
 
 		flags = 0;
-		width = 0;
 
 rflag:		ch = *fmt++;
 reswitch:	switch (ch) {
@@ -495,7 +490,6 @@
 				types.nextarg = n;
 				goto rflag;
 			}
-			width = n;
 			goto reswitch;
 #ifndef NO_FLOATING_POINT
 		case 'L':

Patch attached with submission follows:


diff -u -r1.6 printf-pos.c
--- lib/libc/stdio/printf-pos.c	2 Mar 2009 04:07:58 -0000	1.6
+++ lib/libc/stdio/printf-pos.c	17 Mar 2010 09:16:45 -0000
@@ -248,7 +248,6 @@
 	int n;			/* handy integer (short term usage) */
 	int error;
 	int flags;		/* flags as above */
-	int width;		/* width from format (%8d), or 0 */
 	struct typetable types;	/* table of types */
 
 	fmt = (char *)fmt0;
@@ -266,7 +265,6 @@
 		fmt++;		/* skip over '%' */
 
 		flags = 0;
-		width = 0;
 
 rflag:		ch = *fmt++;
 reswitch:	switch (ch) {
@@ -304,7 +302,6 @@
 				types.nextarg = n;
 				goto rflag;
 			}
-			width = n;
 			goto reswitch;
 #ifndef NO_FLOATING_POINT
 		case 'L':
@@ -439,7 +436,6 @@
 	int n;			/* handy integer (short term usage) */
 	int error;
 	int flags;		/* flags as above */
-	int width;		/* width from format (%8d), or 0 */
 	struct typetable types;	/* table of types */
 
 	fmt = (wchar_t *)fmt0;
@@ -457,7 +453,6 @@
 		fmt++;		/* skip over '%' */
 
 		flags = 0;
-		width = 0;
 
 rflag:		ch = *fmt++;
 reswitch:	switch (ch) {
@@ -495,7 +490,6 @@
 				types.nextarg = n;
 				goto rflag;
 			}
-			width = n;
 			goto reswitch;
 #ifndef NO_FLOATING_POINT
 		case 'L':


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sun Nov 28 13:41:07 UTC 2010 
Responsible-Changed-Why:  
Grab 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152551 
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Thu Dec 2 13:42:32 UTC 2010 
State-Changed-Why:  
Patch committed to head, will MFC after 8.2 has been released.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152551 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/152551: commit references a PR
Date: Thu,  2 Dec 2010 13:40:41 +0000 (UTC)

 Author: gavin
 Date: Thu Dec  2 13:40:21 2010
 New Revision: 216121
 URL: http://svn.freebsd.org/changeset/base/216121
 
 Log:
   Remove two unused variables, left over from the refactoring in r180104.
   
   PR:		bin/152551
   Submitted by:	Henning Petersen <henning.petersen t-online.de>
   MFC after:	2 weeks
 
 Modified:
   head/lib/libc/stdio/printf-pos.c
 
 Modified: head/lib/libc/stdio/printf-pos.c
 ==============================================================================
 --- head/lib/libc/stdio/printf-pos.c	Thu Dec  2 12:44:51 2010	(r216120)
 +++ head/lib/libc/stdio/printf-pos.c	Thu Dec  2 13:40:21 2010	(r216121)
 @@ -248,7 +248,6 @@ __find_arguments (const char *fmt0, va_l
  	int n;			/* handy integer (short term usage) */
  	int error;
  	int flags;		/* flags as above */
 -	int width;		/* width from format (%8d), or 0 */
  	struct typetable types;	/* table of types */
  
  	fmt = (char *)fmt0;
 @@ -266,7 +265,6 @@ __find_arguments (const char *fmt0, va_l
  		fmt++;		/* skip over '%' */
  
  		flags = 0;
 -		width = 0;
  
  rflag:		ch = *fmt++;
  reswitch:	switch (ch) {
 @@ -304,7 +302,6 @@ reswitch:	switch (ch) {
  				types.nextarg = n;
  				goto rflag;
  			}
 -			width = n;
  			goto reswitch;
  #ifndef NO_FLOATING_POINT
  		case 'L':
 @@ -439,7 +436,6 @@ __find_warguments (const wchar_t *fmt0, 
  	int n;			/* handy integer (short term usage) */
  	int error;
  	int flags;		/* flags as above */
 -	int width;		/* width from format (%8d), or 0 */
  	struct typetable types;	/* table of types */
  
  	fmt = (wchar_t *)fmt0;
 @@ -457,7 +453,6 @@ __find_warguments (const wchar_t *fmt0, 
  		fmt++;		/* skip over '%' */
  
  		flags = 0;
 -		width = 0;
  
  rflag:		ch = *fmt++;
  reswitch:	switch (ch) {
 @@ -495,7 +490,6 @@ reswitch:	switch (ch) {
  				types.nextarg = n;
  				goto rflag;
  			}
 -			width = n;
  			goto reswitch;
  #ifndef NO_FLOATING_POINT
  		case 'L':
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Sun Mar 11 22:06:22 UTC 2012 
State-Changed-Why:  
Finally merge this to stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152551 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/152551: commit references a PR
Date: Sun, 11 Mar 2012 22:08:03 +0000 (UTC)

 Author: gavin
 Date: Sun Mar 11 22:07:41 2012
 New Revision: 232838
 URL: http://svn.freebsd.org/changeset/base/232838
 
 Log:
   Merge r216121 from head:
      Remove two unused variables, left over from the refactoring in r180104.
   
   PR:		bin/152551
   Submitted by:	Henning Petersen <henning.petersen t-online.de>
 
 Modified:
   stable/8/lib/libc/stdio/printf-pos.c
 Directory Properties:
   stable/8/lib/libc/   (props changed)
 
 Modified: stable/8/lib/libc/stdio/printf-pos.c
 ==============================================================================
 --- stable/8/lib/libc/stdio/printf-pos.c	Sun Mar 11 21:25:42 2012	(r232837)
 +++ stable/8/lib/libc/stdio/printf-pos.c	Sun Mar 11 22:07:41 2012	(r232838)
 @@ -248,7 +248,6 @@ __find_arguments (const char *fmt0, va_l
  	int n;			/* handy integer (short term usage) */
  	int error;
  	int flags;		/* flags as above */
 -	int width;		/* width from format (%8d), or 0 */
  	struct typetable types;	/* table of types */
  
  	fmt = (char *)fmt0;
 @@ -266,7 +265,6 @@ __find_arguments (const char *fmt0, va_l
  		fmt++;		/* skip over '%' */
  
  		flags = 0;
 -		width = 0;
  
  rflag:		ch = *fmt++;
  reswitch:	switch (ch) {
 @@ -304,7 +302,6 @@ reswitch:	switch (ch) {
  				types.nextarg = n;
  				goto rflag;
  			}
 -			width = n;
  			goto reswitch;
  #ifndef NO_FLOATING_POINT
  		case 'L':
 @@ -439,7 +436,6 @@ __find_warguments (const wchar_t *fmt0, 
  	int n;			/* handy integer (short term usage) */
  	int error;
  	int flags;		/* flags as above */
 -	int width;		/* width from format (%8d), or 0 */
  	struct typetable types;	/* table of types */
  
  	fmt = (wchar_t *)fmt0;
 @@ -457,7 +453,6 @@ __find_warguments (const wchar_t *fmt0, 
  		fmt++;		/* skip over '%' */
  
  		flags = 0;
 -		width = 0;
  
  rflag:		ch = *fmt++;
  reswitch:	switch (ch) {
 @@ -495,7 +490,6 @@ reswitch:	switch (ch) {
  				types.nextarg = n;
  				goto rflag;
  			}
 -			width = n;
  			goto reswitch;
  #ifndef NO_FLOATING_POINT
  		case 'L':
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
