Skip to content

Fix bas_program.c build warning under macos#184

Merged
xiaoxiang781216 merged 2 commits intoapache:masterfrom
liuguo09:testbuild
Apr 17, 2020
Merged

Fix bas_program.c build warning under macos#184
xiaoxiang781216 merged 2 commits intoapache:masterfrom
liuguo09:testbuild

Conversation

@liuguo09
Copy link
Copy Markdown
Contributor

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

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>
Note that mixed case identifier still keep in use.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
@yamt
Copy link
Copy Markdown
Contributor

yamt commented Apr 17, 2020

lgtm

@xiaoxiang781216
Copy link
Copy Markdown
Contributor

Since the modification is minor but github action is unstable now, let's merge this PR to unblock the warning as error PR:
apache/nuttx-testing#34

@xiaoxiang781216 xiaoxiang781216 merged commit a0a2c40 into apache:master Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants