NSH: Fix some warnings about integer/pointer casts of different sizes (probably only effects 64-bit simulation)
This commit is contained in:
parent
cf395b83b8
commit
efa2de16a4
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user