Skip to content

Commit 363f131

Browse files
committed
ccutil: Remove unused variable
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 <sw@weilnetz.de>
1 parent 7b33dad commit 363f131

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ccutil/scanutils.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ static int tvfscanf(FILE* stream, const char *format, va_list ap) {
281281
} state = ST_NORMAL;
282282
char *sarg = NULL; // %s %c or %[ string argument
283283
enum Bail bail = BAIL_NONE;
284-
int sign;
285284
int converted = 0; // Successful conversions
286285
unsigned long matchmap[((1 << CHAR_BIT)+(CHAR_BIT * sizeof(long) - 1)) /
287286
(CHAR_BIT * sizeof(long))];
@@ -363,28 +362,28 @@ static int tvfscanf(FILE* stream, const char *format, va_list ap) {
363362
case 'P': // Upper case pointer
364363
case 'p': // Pointer
365364
rank = RANK_PTR;
366-
base = 0; sign = 0;
365+
base = 0;
367366
goto scan_int;
368367

369368
case 'i': // Base-independent integer
370-
base = 0; sign = 1;
369+
base = 0;
371370
goto scan_int;
372371

373372
case 'd': // Decimal integer
374-
base = 10; sign = 1;
373+
base = 10;
375374
goto scan_int;
376375

377376
case 'o': // Octal integer
378-
base = 8; sign = 0;
377+
base = 8;
379378
goto scan_int;
380379

381380
case 'u': // Unsigned decimal integer
382-
base = 10; sign = 0;
381+
base = 10;
383382
goto scan_int;
384383

385384
case 'x': // Hexadecimal integer
386385
case 'X':
387-
base = 16; sign = 0;
386+
base = 16;
388387
goto scan_int;
389388

390389
case 'n': // Number of characters consumed

0 commit comments

Comments
 (0)