aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Thelen <gthelen@google.com>2011-11-30 15:55:57 -0800
committermaximilian attems <max@stro.at>2011-12-04 14:45:22 +0100
commitacf09ea80536ac49a0001249956fef999b8d35af (patch)
tree94edc788fa4f0ccfd9997fa2ec125b4f78f0e664
parent1c3e2f3c152ef2a55d47b7149c85f167fabd8f2f (diff)
downloadklibc-acf09ea80536ac49a0001249956fef999b8d35af.tar.gz
[klibc] vsscanf: remove unused variables
Removed unused local variable from vsscanf(). Signed-off-by: Greg Thelen <gthelen@google.com> "POSIX is quite explicit that the unsigned formats still accept signed input, and since klibc requires that signed and unsigned integer types are the same the only reason to track it would be to handle numeric overflow." -hpa Acked-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/klibc/vsscanf.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/usr/klibc/vsscanf.c b/usr/klibc/vsscanf.c
index 51e50f7d0c916..b8f068cc087dc 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 */