NSH: Fix some warnings about integer/pointer casts of different sizes (probably only effects 64-bit simulation)

This commit is contained in:
Gregory Nutt 2017-04-03 09:26:10 -06:00
parent cf395b83b8
commit efa2de16a4
2 changed files with 4 additions and 2 deletions

View File

@ -48,6 +48,8 @@
#include <stdbool.h>
#include <nuttx/net/netconfig.h>
#include <nuttx/net/ethernet.h>
#include <nuttx/net/ip.h>
/****************************************************************************
* Pre-processor Definitions

View File

@ -575,7 +575,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr,
static void wget_callback(FAR char **buffer, int offset, int datend,
FAR int *buflen, FAR void *arg)
{
(void)write((int)arg, &((*buffer)[offset]), datend - offset);
(void)write((int)((intptr_t)arg), &((*buffer)[offset]), datend - offset);
}
#endif
#endif
@ -1668,7 +1668,7 @@ int cmd_wget(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* And perform the wget */
ret = wget(url, buffer, 512, wget_callback, (FAR void *)fd);
ret = wget(url, buffer, 512, wget_callback, (FAR void *)((intptr_t)fd));
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, argv[0], "wget", NSH_ERRNO);