Skip to content

Commit

Permalink
ccutil: Remove unused variable
Browse files Browse the repository at this point in the history
This fixes a compiler warning:

ccutil/scanutils.cpp:284:7: warning:
 variable 'sign' set but not used [-Wunused-but-set-variable]

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Mar 8, 2017
1 parent 7b33dad commit 363f131
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ccutil/scanutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ static int tvfscanf(FILE* stream, 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)+(CHAR_BIT * sizeof(long) - 1)) /
(CHAR_BIT * sizeof(long))];
Expand Down Expand Up @@ -363,28 +362,28 @@ static int tvfscanf(FILE* stream, const char *format, va_list ap) {
case 'P': // Upper case pointer
case 'p': // Pointer
rank = RANK_PTR;
base = 0; sign = 0;
base = 0;
goto scan_int;

case 'i': // Base-independent integer
base = 0; sign = 1;
base = 0;
goto scan_int;

case 'd': // Decimal integer
base = 10; sign = 1;
base = 10;
goto scan_int;

case 'o': // Octal integer
base = 8; sign = 0;
base = 8;
goto scan_int;

case 'u': // Unsigned decimal integer
base = 10; sign = 0;
base = 10;
goto scan_int;

case 'x': // Hexadecimal integer
case 'X':
base = 16; sign = 0;
base = 16;
goto scan_int;

case 'n': // Number of characters consumed
Expand Down

0 comments on commit 363f131

Please sign in to comment.