You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/07 21:48:00 UTC
[incubator-nuttx] branch pr50 updated: net/icmpv6/icmpv6_netpoll.c:
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. Garbage was being returned on success.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch pr50
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/pr50 by this push:
new c257802 net/icmpv6/icmpv6_netpoll.c: 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. Garbage was being returned on success.
c257802 is described below
commit c257802b691218a2ea8f9d92b50617407d4ae153
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Tue Jan 7 12:13:09 2020 -0600
net/icmpv6/icmpv6_netpoll.c: 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. 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 82f6dda..92d6c03 100644
--- a/net/icmpv6/icmpv6_netpoll.c
+++ b/net/icmpv6/icmpv6_netpoll.c
@@ -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);