From 5a29e86847562fbbb474696bc5f4148f8a516c67 Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Fri, 17 Apr 2020 10:03:10 +0800 Subject: [PATCH] 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 --- interpreters/bas/bas_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpreters/bas/bas_program.c b/interpreters/bas/bas_program.c index dd6e0daf4..a4355ed47 100644 --- a/interpreters/bas/bas_program.c +++ b/interpreters/bas/bas_program.c @@ -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])); } }