mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-16 06:11:00 +01: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 75875a7c8c7348e90e373c007bafdedcc6253ab4)
This commit is contained in:
parent
66c9f287c2
commit
3ff2c1d9b8
@ -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…
x
Reference in New Issue
Block a user