Fix bas_program.c build warning under macos

bas_program.c:234:35: error: adding 'size_t' (aka 'unsigned long') to a string does not append to the string [-Werror,-Wstring-plus-int]
      FS_putChars(chn, "        " + len);
                       ~~~~~~~~~~~^~~~~
bas_program.c:234:35: note: use array indexing to silence this warning
      FS_putChars(chn, "        " + len);
                                  ^
                       &          [    ]
1 error generated.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
liuhaitao 2020-04-17 10:03:10 +08:00 committed by Xiang Xiao
parent 1b572ff169
commit 5a29e86847

View File

@ -231,7 +231,7 @@ static void printName(const void *k, struct Program *p, int chn)
FS_putChars(chn, (const char *)k);
if (len < 8)
{
FS_putChars(chn, " " + len);
FS_putChars(chn, &(" "[len]));
}
}