mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -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.
This commit is contained in:
parent
ce44f12c1e
commit
75875a7c8c
2 changed files with 2 additions and 2 deletions
|
|
@ -329,7 +329,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