mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-31 15:47:10 +00: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
@ -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 New Issue
Block a user