From 8774977f4d77b4692a97b534034880c457218e77 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 1 Jul 2019 15:22:42 -0600 Subject: [PATCH] Fix warnings found in build testing. --- net/inet/inet_close.c | 3 ++- net/tcp/tcp.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/inet/inet_close.c b/net/inet/inet_close.c index 6ebf3d4514..3861131805 100644 --- a/net/inet/inet_close.c +++ b/net/inet/inet_close.c @@ -421,7 +421,6 @@ static inline int udp_close(FAR struct socket *psock) struct timespec abstime; bool linger; #endif - int ret; /* Interrupts are disabled here to avoid race conditions */ @@ -446,6 +445,8 @@ static inline int udp_close(FAR struct socket *psock) linger = _SO_GETOPT(psock->s_options, SO_LINGER); if (linger) { + int ret; + /* Get the current time */ ret = clock_gettime(CLOCK_REALTIME, &abstime); diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h index 3088559436..0f7d52a8c3 100644 --- a/net/tcp/tcp.h +++ b/net/tcp/tcp.h @@ -1758,7 +1758,7 @@ struct timespec; int tcp_txdrain(FAR struct socket *psock, FAR const struct timespec *abstime); #else -# define udp_txdrain(conn, abstime) (0) +# define tcp_txdrain(conn, abstime) (0) #endif #undef EXTERN