Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Nov 2010 17:42:16 GMT
From:      Henning Petersen <henning.petersen@t-online.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/152551: Remove unused variables.
Message-ID:  <201011241742.oAOHgGh3052955@red.freebsd.org>
Resent-Message-ID: <201011241750.oAOHo9AA033382@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         152551
>Category:       bin
>Synopsis:       Remove unused variables.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 24 17:50:09 UTC 2010
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011241742.oAOHgGh3052955>