浏览代码

fix some compiling warning.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2571 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong@gmail.com 12 年之前
父节点
当前提交
9a8fbc6f17
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 4 4
      components/finsh/cmd.c
  2. 4 0
      components/finsh/shell.c

+ 4 - 4
components/finsh/cmd.c

@@ -287,14 +287,14 @@ static long _list_memheap(struct rt_list_node *list)
     struct rt_memheap *mh;
     struct rt_list_node *node;
 
-    rt_kprintf("memheap  pool size available size\n");
-    rt_kprintf("-------- --------- --------------\n");
+    rt_kprintf("memheap  pool size  max used size available size\n");
+    rt_kprintf("-------- ---------- ------------- --------------\n");
     for (node = list->next; node != list; node = node->next)
     {
         mh = (struct rt_memheap *)rt_list_entry(node, struct rt_object, list);
 
-        rt_kprintf("%-8.*s %04d  %04d\n", RT_NAME_MAX, mh->parent.name,
-                mh->pool_size, mh->available_size);
+        rt_kprintf("%-8.*s %-010d %-013d %-05d\n", RT_NAME_MAX, mh->parent.name,
+                mh->pool_size, mh->max_used_size, mh->available_size);
     }
 
     return 0;

+ 4 - 0
components/finsh/shell.c

@@ -26,6 +26,10 @@
 #include "finsh.h"
 #include "shell.h"
 
+#ifdef _WIN32
+#include <stdio.h> /* for putchar */
+#endif
+
 /* finsh thread */
 static struct rt_thread finsh_thread;
 ALIGN(RT_ALIGN_SIZE)