Files
jemalloc/src
Vaibhav Jain 2d6d099fed Fix GCC-9.1 warning with macro GET_ARG_NUMERIC
GCC-9.1 reports following error when trying to compile file
src/malloc_io.c and with CFLAGS='-Werror' :

src/malloc_io.c: In function ‘malloc_vsnprintf’:
src/malloc_io.c:369:2: error: case label value exceeds maximum value for type [-Werror]
  369 |  case '?' | 0x80:      \
      |  ^~~~
src/malloc_io.c:581:5: note: in expansion of macro ‘GET_ARG_NUMERIC’
  581 |     GET_ARG_NUMERIC(val, 'p');
      |     ^~~~~~~~~~~~~~~
...
<snip>
cc1: all warnings being treated as errors
make: *** [Makefile:388: src/malloc_io.sym.o] Error 1

The warning is reported as by default the type 'char' is 'signed char'
and or-ing 0x80 will turn the case label char negative which will be
beyond the printable ascii range (0 - 127).

The patch fixes this by explicitly casting the 'len' variable as
unsigned char' inside the 'switch' statement so that value of
expression " '?' | 0x80 " falls within the legal values of the
variable 'len'.
2019-05-21 11:20:07 -07:00
..
2018-07-23 13:37:08 -07:00
2017-04-18 19:01:04 -07:00
2018-07-12 20:53:06 -07:00
2019-05-08 13:15:19 -07:00
2018-06-27 13:39:02 -07:00
2019-05-15 09:42:52 -07:00
2018-08-01 13:27:11 -07:00
2017-05-23 12:26:20 -07:00
2019-04-15 16:48:12 -07:00
2018-07-09 21:40:42 -07:00
2018-10-15 08:24:12 -07:00
2019-04-16 11:07:15 -07:00