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:
parent
0d5e9f9620
commit
fdeed32844
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue