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:51:39 UTC
[incubator-nuttx] branch master updated:
net/icmpv6/icmpv6_netpoll.c: Fix two warnings found in build testing
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new afc2bff net/icmpv6/icmpv6_netpoll.c: Fix two warnings found in build testing
afc2bff is described below
commit afc2bffb7d23546a34365e019b61175fbf192af7
Author: Gregory Nutt <sp...@gmail.com>
AuthorDate: Tue Jan 7 18:49:55 2020 -0300
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 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);