adc: adc_shell: suppress -Wchar-subscripts with isdigit()

Suppress -Wchar-subscripts warnings when building with Newlib, by
casting isdigit() parameter to unsigned char.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
Marcin Niestroj 2020-07-07 11:27:47 +02:00 committed by Carles Cufí
commit fdeed32844

View file

@ -138,7 +138,7 @@ static int cmd_adc_channel(const struct shell *shell, size_t argc, char **argv)
shell_error(shell, "ADC device not found");
return -ENODEV;
}
if (!isdigit(argv[args_indx.conf][0])) {
if (!isdigit((unsigned char)argv[args_indx.conf][0])) {
shell_error(shell, "<channel> must be digits");
return -EINVAL;
}
@ -229,7 +229,7 @@ static int cmd_adc_acq(const struct shell *shell, size_t argc, char **argv)
return -ENODEV;
}
if (!isdigit(argv[args_indx.conf][0])) {
if (!isdigit((unsigned char)argv[args_indx.conf][0])) {
shell_error(shell, "<time> must be digits");
return -EINVAL;
}
@ -276,7 +276,7 @@ static int cmd_adc_reso(const struct shell *shell, size_t argc, char **argv)
shell_error(shell, "ADC device not found");
return -ENODEV;
}
if (!isdigit(argv[args_indx.conf][0])) {
if (!isdigit((unsigned char)argv[args_indx.conf][0])) {
shell_error(shell, "<resolution> must be digits");
return -EINVAL;
}