commit b29b850: [Minor] Explicit specify order of binary operations

Christian Göttsche cgzones at googlemail.com
Tue Apr 14 09:56:16 UTC 2020


Author: Christian Göttsche
Date: 2020-04-06 16:27:45 +0200
URL: https://github.com/rspamd/rspamd/commit/b29b85055e05b1e2f5112ca93c7c6b4673ff42ca (refs/pull/3332/head)

[Minor] Explicit specify order of binary operations
../contrib/libev/ev.c: In function ‘ev_io_start’:
../contrib/libev/ev.c:4396:34: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
 4396 |   fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
      |                        ~~~~~~~~~~^~~~~~~~~~~~~

---
 contrib/libev/ev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/libev/ev.c b/contrib/libev/ev.c
index 3aab45006..e569a010c 100644
--- a/contrib/libev/ev.c
+++ b/contrib/libev/ev.c
@@ -4388,7 +4388,7 @@ ev_io_start (EV_P_ ev_io *w) EV_NOEXCEPT
   /* common bug, apparently */
   assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w));
 
-  fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
+  fd_change (EV_A_ fd, (w->events & EV__IOFDSET) | EV_ANFD_REIFY);
   w->events &= ~EV__IOFDSET;
 
   EV_FREQUENT_CHECK;


More information about the Commits mailing list