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:47 UTC
[incubator-nuttx-apps] branch master updated (3a6775c8a -> 0c200b896)
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
from 3a6775c8a examples/tcp_ipc_server: fix wrong file path typo
new 81de5d4c5 Fix foc_fixed16_thr.c:188:27: error: variable 'time' set but not used
new 0c200b896 Fix dac_main.c: error: format string is not a string literal (potentially insecure)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
examples/dac/dac_main.c | 4 ++--
examples/foc/foc_fixed16_thr.c | 5 +++--
examples/foc/foc_float_thr.c | 5 +++--
3 files changed, 8 insertions(+), 6 deletions(-)
[incubator-nuttx-apps] 02/02: Fix dac_main.c: error: format string is not a string literal (potentially insecure)
Posted by pk...@apache.org.
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 0c200b8966fece082c6cf8d2d231bd34859a41f0
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Nov 19 13:17:16 2022 +0800
Fix dac_main.c: error: format string is not a string literal (potentially insecure)
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/dac/dac_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/dac/dac_main.c b/examples/dac/dac_main.c
index 14b9942ba..d0ef1c6b1 100644
--- a/examples/dac/dac_main.c
+++ b/examples/dac/dac_main.c
@@ -110,7 +110,7 @@ static void print_cmds(FAR const char *header,
size_t ncmds,
FAR const char *trailer)
{
- printf(header);
+ printf("%s", header);
while (ncmds--)
{
printf(" %s %s %c", cmds->name, cmds->args,
@@ -118,7 +118,7 @@ static void print_cmds(FAR const char *header,
cmds++;
}
- printf(trailer);
+ printf("%s", trailer);
}
static const struct command *find_cmd(FAR const char *name,
[incubator-nuttx-apps] 01/02: Fix foc_fixed16_thr.c:188:27: error: variable 'time' set but not used
Posted by pk...@apache.org.
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);