You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/11/19 17:47:48 UTC
[incubator-nuttx-apps] 01/02: Fix foc_fixed16_thr.c:188:27: error: variable 'time' set but not used
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 81de5d4c5962e45ad01031610032be10f2a2abd1
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Nov 19 12:56:41 2022 +0800
Fix foc_fixed16_thr.c:188:27: error: variable 'time' set but not used
and foc_float_thr.c:189:27: error: variable 'time' set but not used
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/foc/foc_fixed16_thr.c | 5 +++--
examples/foc/foc_float_thr.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/examples/foc/foc_fixed16_thr.c b/examples/foc/foc_fixed16_thr.c
index a32cfd562..c2c161433 100644
--- a/examples/foc/foc_fixed16_thr.c
+++ b/examples/foc/foc_fixed16_thr.c
@@ -185,9 +185,10 @@ int foc_fixed16_thr(FAR struct foc_ctrl_env_s *envp)
struct foc_mq_s handle;
struct foc_motor_b16_s motor;
struct foc_device_s dev;
- int time = 0;
- int ret = OK;
+ int time = 0;
+ int ret = OK;
+ UNUSED(time);
DEBUGASSERT(envp);
PRINTFV("foc_fixed_thr, id=%d\n", envp->id);
diff --git a/examples/foc/foc_float_thr.c b/examples/foc/foc_float_thr.c
index 30395e269..dcab5de2f 100644
--- a/examples/foc/foc_float_thr.c
+++ b/examples/foc/foc_float_thr.c
@@ -186,9 +186,10 @@ int foc_float_thr(FAR struct foc_ctrl_env_s *envp)
struct foc_mq_s handle;
struct foc_motor_f32_s motor;
struct foc_device_s dev;
- int time = 0;
- int ret = OK;
+ int time = 0;
+ int ret = OK;
+ UNUSED(time);
DEBUGASSERT(envp);
PRINTFV("foc_float_thr, id=%d\n", envp->id);