From: Michalis Pappas Date: Sat, 30 Dec 2023 10:43:34 +0000 (+0100) Subject: Silence warning on arithmetic operation on socket flags X-Git-Tag: RELEASE-0.16.0~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b9943070ec9d315068609cb6eec071078bd41ba5;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 GitHub-Closes: #43 --- diff --git a/sockets.c b/sockets.c index a0bb715..0dbf5a8 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);