From afc2bffb7d23546a34365e019b61175fbf192af7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 7 Jan 2020 18:49:55 -0300 Subject: [PATCH] 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. --- net/icmpv6/icmpv6_netpoll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/icmpv6/icmpv6_netpoll.c b/net/icmpv6/icmpv6_netpoll.c index 82f6dda646..92d6c034ae 100644 --- a/net/icmpv6/icmpv6_netpoll.c +++ b/net/icmpv6/icmpv6_netpoll.c @@ -43,6 +43,7 @@ #include #include +#include #include #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);