From 81c81215513b848ba05c180080c41388c2cb350a Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 26 Feb 2016 15:23:04 +0100 Subject: [PATCH] minor: fixed compiler warning "unary minus operator is applied to an unsigned expression" --- src/api/sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/sockets.c b/src/api/sockets.c index d7054d34..0f01fa2d 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -308,8 +308,8 @@ static const int err_to_errno_table[] = { #define ERR_TO_ERRNO_TABLE_SIZE LWIP_ARRAYSIZE(err_to_errno_table) #define err_to_errno(err) \ - ((unsigned)(-(err)) < ERR_TO_ERRNO_TABLE_SIZE ? \ - err_to_errno_table[-(err)] : EIO) + ((unsigned)(-(signed)(err)) < ERR_TO_ERRNO_TABLE_SIZE ? \ + err_to_errno_table[-(signed)(err)] : EIO) #if LWIP_SOCKET_SET_ERRNO #ifndef set_errno