From: Michalis Pappas Date: Mon, 1 Jan 2024 14:41:40 +0000 (+0100) Subject: Silence warning on arithmetic operation on socket flags X-Git-Tag: RELEASE-0.16.0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a43bf6190879167731184d26e8756ca1839b3943;p=unikraft%2Flibs%2Flwip.git Silence warning on arithmetic operation on socket flags Wrap bitwise OR of socket flags around parenthesis to silcence compiler warning. Signed-off-by: Michalis Pappas Approved-by: Razvan Deaconescu Reviewed-by: Razvan Deaconescu Reviewed-by: Stefan Jumarea GitHub-Closes: #44 --- diff --git a/sockets.c b/sockets.c index a0bb715..1af7a94 100644 --- a/sockets.c +++ b/sockets.c @@ -80,7 +80,7 @@ lwip_posix_socket_create(struct posix_socket_driver *d, int family, int type, int flags, rc; /* Blocking is handled by posix-socket */ - flags = type & SOCK_FLAGS | SOCK_NONBLOCK; + flags = (type & SOCK_FLAGS) | SOCK_NONBLOCK; type = type & ~SOCK_FLAGS; lwip_fd = lwip_socket(family, type, protocol);