[klibc] [PATCH] vsscanf: remove unused variables

Greg Thelen gthelen at google.com
Wed Nov 30 15:55:57 PST 2011


Removed unused local variable from vsscanf().

Signed-off-by: Greg Thelen <gthelen at google.com>
---
 usr/klibc/vsscanf.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/usr/klibc/vsscanf.c b/usr/klibc/vsscanf.c
index 51e50f7..b8f068c 100644
--- a/usr/klibc/vsscanf.c
+++ b/usr/klibc/vsscanf.c
@@ -88,7 +88,6 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
 	} state = st_normal;
 	char *sarg = NULL;	/* %s %c or %[ string argument */
 	enum bail bail = bail_none;
-	int sign;
 	int converted = 0;	/* Successful conversions */
 	unsigned long matchmap[((1 << CHAR_BIT) + (LONG_BIT - 1)) / LONG_BIT];
 	int matchinv = 0;	/* Is match map inverted? */
@@ -177,33 +176,27 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
 				case 'p':	/* Pointer */
 					rank = rank_ptr;
 					base = 0;
-					sign = 0;
 					goto scan_int;
 
 				case 'i':	/* Base-independent integer */
 					base = 0;
-					sign = 1;
 					goto scan_int;
 
 				case 'd':	/* Decimal integer */
 					base = 10;
-					sign = 1;
 					goto scan_int;
 
 				case 'o':	/* Octal integer */
 					base = 8;
-					sign = 0;
 					goto scan_int;
 
 				case 'u':	/* Unsigned decimal integer */
 					base = 10;
-					sign = 0;
 					goto scan_int;
 
 				case 'x':	/* Hexadecimal integer */
 				case 'X':
 					base = 16;
-					sign = 0;
 					goto scan_int;
 
 				case 'n':	/* # of characters consumed */
-- 
1.7.3.1



More information about the klibc mailing list