net/icmpv6/icmpv6_netpoll.c: Fix two warnings found in build testing

Description:

Fix two warnings found in build testing: (1) Need to include nuttx/semaphore.h
from prototype of nxsem_post() and (2) need to initialize return value of function.
Uninittialized garbage was being returned on success.Fix two warnings found in
build testing: (1) Need to include nuttx/semaphore.h from prototype of
nxsem_post() and (2) need to initialize return value of function.
Uninittialized garbage was being returned on success.
This commit is contained in:
Gregory Nutt 2020-01-07 18:49:55 -03:00 committed by Alan Carvalho de Assis
parent 15eddd29c8
commit afc2bffb7d

View File

@ -43,6 +43,7 @@
#include <poll.h>
#include <debug.h>
#include <nuttx/semaphore.h>
#include <nuttx/net/net.h>
#include "devif/devif.h"
@ -158,7 +159,7 @@ int icmpv6_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
FAR struct icmpv6_conn_s *conn = psock->s_conn;
FAR struct icmpv6_poll_s *info;
FAR struct devif_callback_s *cb;
int ret;
int ret = OK;
DEBUGASSERT(conn != NULL && fds != NULL);