This diagnostic is emitted when building on cygwin:
main.c:233:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
233 | if (errno != 0 || !isdigit(arg[0])) {
| ~~~^~~
This is due to passing a `char` argument to isdigit. According to the
man page of isdigit, the arguments of type `char` must be cast to
`unsigned char`, so they are able to represent the EOF value. This
patch does that, and should get rid of the warning.
Change-Id: Iaed4c0b494a79b917761e65f18388f43478b97e1
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
errno = 0;
v = strtoul(arg, NULL, 0);
- if (errno != 0 || !isdigit(arg[0])) {
+ if (errno != 0 || !isdigit((unsigned char) arg[0])) {
ERR("Wrong value in --fd-pool-size parameter: %s", arg);
ret = -1;
goto end;