Fixed warning W-char-subscripts in sof logger

Newer gcc compilers 9.1+ issue a W-char-subscripts warning when argument
type passed to isspace is not explicitly int. Added cast to int.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
This commit is contained in:
Andrey Borisovich 2022-02-02 18:35:45 +01:00 committed by Liam Girdwood
parent 04a0d3c1b5
commit f11e275aab
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ void log_err(const char *fmt, ...)
/* trim whitespaces from string begin */
char *ltrim(char *s)
{
while (isspace(*s))
while (isspace((int)*s))
s++;
return s;
}
@ -93,7 +93,7 @@ char *rtrim(char *s)
{
char *ptr = s + strlen(s) - 1;
while (ptr >= s && isspace(*ptr)) {
while (ptr >= s && isspace((int)*ptr)) {
*ptr = '\0';
--ptr;
}