Browse Source

uclibc: prevent warning about setting an unused variable

This variable is used either if __UCLIBC_HAS_FLOATS__ is defined or if
__UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ is defined. Instead of adding more
complicated #ifdef magic, just mark this variable as possibly unused to
satisfy the compiler.

Signed-off-by: marcus.haehnel@kernkonzept.com
Frank Mehnert 3 months ago
parent
commit
34f10c209d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/stdio/_scanf.c

+ 1 - 1
libc/stdio/_scanf.c

@@ -1715,7 +1715,7 @@ int attribute_hidden __psfs_do_numeric(psfs_t *psfs, struct scan_cookie *sc)
 #define MAX_DIGITS 65			/* Allow one leading 0. */
 	unsigned char buf[MAX_DIGITS+2+ 100];
 	unsigned char usflag, base;
-	unsigned char nonzero = 0;
+	unsigned char nonzero __attribute__((unused)) = 0;
 	unsigned char seendigit = 0;
 
 #ifndef __UCLIBC_HAS_FLOATS__