mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-23 19:03:06 -04:00
[BUILD] silent a warning in unlikely() with gcc 4.x
The unlikely() implementation for gcc 4.x spits out a warning
when a pointer is passed. Add a cast to unsigned long.
(cherry picked from commit 75875a7c8c)
This commit is contained in:
parent
66c9f287c2
commit
3ff2c1d9b8
2 changed files with 2 additions and 2 deletions
|
|
@ -322,7 +322,7 @@ static inline int fls64(unsigned long long x)
|
|||
* only work with ints and booleans though.
|
||||
*/
|
||||
#define likely(x) (x)
|
||||
#define unlikely(x) (__builtin_expect((x), 0))
|
||||
#define unlikely(x) (__builtin_expect((unsigned long)(x), 0))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
* only work with ints and booleans though.
|
||||
*/
|
||||
#define likely(x) (x)
|
||||
#define unlikely(x) (__builtin_expect((x), 0))
|
||||
#define unlikely(x) (__builtin_expect((unsigned long)(x), 0))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue