Fix warnings found in build testing.

This commit is contained in:
Gregory Nutt 2019-07-01 15:22:42 -06:00
parent 077d164b14
commit 8774977f4d
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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