diff options
| author | bernard.xiong <[email protected]> | 2010-01-15 13:13:10 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-01-15 13:13:10 +0000 |
| commit | a57580b9ccd58d776e3241960415a126d9dcb33a (patch) | |
| tree | daa541fe12b7baa8a933e4d59ff0f4cec52c5895 | |
| parent | 133c2743dcb864854c42679f0c53e6021f102106 (diff) | |
remove compile warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@308 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | finsh/cmd.c | 4 | ||||
| -rw-r--r-- | finsh/finsh.h | 5 | ||||
| -rw-r--r-- | finsh/shell.c | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/finsh/cmd.c b/finsh/cmd.c index e23fc2e6b0..9e9005d6c0 100644 --- a/finsh/cmd.c +++ b/finsh/cmd.c @@ -379,7 +379,9 @@ void list_prefix(char* prefix) const char* name_ptr; func_cnt = 0; - var_cnt = 0; + var_cnt = 0;
+ name_ptr = RT_NULL;
+ { struct finsh_syscall* index; for (index = _syscall_table_begin; index < _syscall_table_end; index ++) diff --git a/finsh/finsh.h b/finsh/finsh.h index d97254bf9a..f499016b9b 100644 --- a/finsh/finsh.h +++ b/finsh/finsh.h @@ -68,7 +68,10 @@ char *strdup(const char *s); int isalpha( int ch ); int atoi(const char* s); -#else +#else
+/* use libc of armcc */
+#include <ctype.h>
+#include <stdlib.h> #include <string.h> #endif #endif diff --git a/finsh/shell.c b/finsh/shell.c index 9144c29beb..122030ff6b 100644 --- a/finsh/shell.c +++ b/finsh/shell.c @@ -113,7 +113,8 @@ char *strdup(const char *s) return tmp; } #endif - +
+#if !defined(__CC_ARM) && !defined(__ICCARM__) int isalpha( int ch ) { return (unsigned int)((ch | 0x20) - 'a') < 26u; @@ -142,7 +143,8 @@ int atoi(const char* s) int isprint(unsigned char ch) { return (unsigned int)(ch - ' ') < 127u - ' '; -} +}
+#endif #endif #ifdef RT_USING_DEVICE |
