First Commit
[librecmc/package-feed.git] / net / haproxy / patches / 0021-BUILD-poll-remove-unused-hap_fd_isset-which-causes-a.patch
1 From a19f5bfb0d1e606dc2eb80af903c229ca41d5057 Mon Sep 17 00:00:00 2001
2 From: Willy Tarreau <w@1wt.eu>
3 Date: Wed, 10 Aug 2016 21:21:57 +0200
4 Subject: [PATCH 21/26] BUILD: poll: remove unused hap_fd_isset() which causes
5  a warning with clang
6
7 Clang reports that this function is not used :
8
9 src/ev_poll.c:34:28: warning: unused function 'hap_fd_isset' [-Wunused-function]
10 static inline unsigned int hap_fd_isset(int fd, unsigned int *evts)
11
12 It's been true since the rework of the pollers in 1.5 and it's unlikely we'll
13 ever need it anymore, so better remove it now to provide clean builds.
14
15 This fix can be backported to 1.6 and 1.5 now.
16 (cherry picked from commit 091e86e1ee8ec51bd5a3c1935666a822a51b9051)
17 ---
18  src/ev_poll.c | 5 -----
19  1 file changed, 5 deletions(-)
20
21 diff --git a/src/ev_poll.c b/src/ev_poll.c
22 index 44a2b9b..80d88eb 100644
23 --- a/src/ev_poll.c
24 +++ b/src/ev_poll.c
25 @@ -31,11 +31,6 @@ static unsigned int *fd_evts[2];
26  static struct pollfd *poll_events = NULL;
27  
28  
29 -static inline unsigned int hap_fd_isset(int fd, unsigned int *evts)
30 -{
31 -       return evts[fd / (8*sizeof(*evts))] & (1U << (fd & (8*sizeof(*evts) - 1)));
32 -}
33 -
34  static inline void hap_fd_set(int fd, unsigned int *evts)
35  {
36         evts[fd / (8*sizeof(*evts))] |= 1U << (fd & (8*sizeof(*evts) - 1));
37 -- 
38 2.7.3
39