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 2023/04/25 12:00:59 UTC
[nuttx-apps] branch master updated: system/critmon: fix warning
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
The following commit(s) were added to refs/heads/master by this push:
new 08bfc4e9c system/critmon: fix warning
08bfc4e9c is described below
commit 08bfc4e9c70f071f43ceee83df62f0f553b94e5e
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Mon Apr 24 21:50:21 2023 +0800
system/critmon: fix warning
critmon.c:269:3: warning: 'runtime' may be used uninitialized in this function [-Wmaybe-uninitialized]
269 | printf("%11s %11s %11s %-16s %-5s %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
270 | maxpreemp, maxcrit, maxrun, runtime, entryp->d_name, name);
Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
system/critmon/critmon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/system/critmon/critmon.c b/system/critmon/critmon.c
index 8a7dcbec9..8a67dd22b 100644
--- a/system/critmon/critmon.c
+++ b/system/critmon/critmon.c
@@ -248,12 +248,14 @@ static int critmon_process_directory(FAR struct dirent *entryp)
else
{
maxrun = "None";
+ runtime = "None";
}
}
else
{
maxcrit = "None";
maxrun = "None";
+ runtime = "None";
}
/* Finally, output the stack info that we gleaned from the procfs */