mirror of https://github.com/thesofproject/sof.git
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:
parent
04a0d3c1b5
commit
f11e275aab
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue