Elminate some warnings on tiny systems

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3719 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-06-17 18:20:14 +00:00
parent eb17d5e280
commit 3932092be0
3 changed files with 9 additions and 8 deletions

View File

@ -114,7 +114,7 @@ int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
/* Get the address to be accessed */
mem->dm_addr = (void*)strtol(argv[1], NULL, 16);
mem->dm_addr = (void*)((uintptr_t)strtol(argv[1], NULL, 16));
/* Get the number of bytes to access */
@ -332,11 +332,11 @@ void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
#ifndef CONFIG_NSH_DISABLE_XD
int cmd_xd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
char *addr;
char *endptr;
int nbytes;
FAR char *addr;
FAR char *endptr;
int nbytes;
addr = (char*)strtol(argv[1], &endptr, 16);
addr = (char*)((uintptr_t)strtol(argv[1], &endptr, 16));
if (argv[0][0] == '\0' || *endptr != '\0')
{
return ERROR;

View File

@ -455,7 +455,6 @@ static inline int dd_outfopen(const char *name, struct dd_s *dd)
DD_OUTFD = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (DD_OUTFD < 0)
{
FAR struct nsh_vtbl_s *vtbl = dd->vtbl;
nsh_output(dd->vtbl, g_fmtcmdfailed, g_dd, "open", NSH_ERRNO);
return ERROR;
}

View File

@ -112,7 +112,9 @@ static const char *g_ttypenames[4] =
static void ps_task(FAR _TCB *tcb, FAR void *arg)
{
struct nsh_vtbl_s *vtbl = (struct nsh_vtbl_s*)arg;
#if CONFIG_MAX_TASK_ARGS > 2
int i;
#endif
/* Show task status */
@ -159,9 +161,9 @@ static void ps_task(FAR _TCB *tcb, FAR void *arg)
int cmd_exec(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
char *endptr;
long addr;
uintptr_t addr;
addr = strtol(argv[1], &endptr, 0);
addr = (uintptr_t)strtol(argv[1], &endptr, 0);
if (!addr || endptr == argv[1] || *endptr != '\0')
{
nsh_output(vtbl, g_fmtarginvalid, argv[0]);