浏览代码

Fix compile warning: variable "c" was declared but never referenced, when RT_USING_CONSOLE is disable.

Bright Pan 10 年之前
父节点
当前提交
eeadfe4705
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      components/libc/armlibc/stubs.c

+ 2 - 0
components/libc/armlibc/stubs.c

@@ -224,10 +224,12 @@ char *_sys_command_string(char *cmd, int len)
 /* This function writes a character to the console. */
 void _ttywrch(int ch)
 {
+#ifdef RT_USING_CONSOLE
     char c;
 
     c = (char)ch;
     rt_kprintf(&c);
+#endif
 }
 
 void _sys_exit(int return_code)