You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/18 03:36:34 UTC
(nuttx-apps) 02/02: examples/sotest: Fix warning of unused variable 'devname'
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 758ed5572272e968cfd5bd054091b195be5e15af
Author: wangjianyu3 <wa...@xiaomi.com>
AuthorDate: Wed Mar 6 22:30:46 2024 +0800
examples/sotest: Fix warning of unused variable 'devname'
Config:
+CONFIG_EXAMPLES_SOTEST=y
+CONFIG_EXAMPLES_SOTEST_BINDIR="/data"
Log:
sotest_main.c: In function 'sotest_main':
sotest_main.c:105:8: error: unused variable 'devname' [-Werror=unused-variable]
105 | char devname[32];
| ^~~~~~~
Signed-off-by: wangjianyu3 <wa...@xiaomi.com>
---
examples/sotest/sotest_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/sotest/sotest_main.c b/examples/sotest/sotest_main.c
index 5c1568e59..2f63ef60b 100644
--- a/examples/sotest/sotest_main.c
+++ b/examples/sotest/sotest_main.c
@@ -102,7 +102,9 @@ extern const int g_sot_nexports;
int main(int argc, FAR char *argv[])
{
+#ifdef CONFIG_EXAMPLES_SOTEST_BUILTINFS
char devname[32];
+#endif
#if CONFIG_MODLIB_MAXDEPEND > 0
FAR void *handle1;
#endif