ugly warnings with likely/unlikely
Hi,
if (likely(stru->pointer))
results in an ugly warning about using pointer as int. Is there something that could be done against that ?
Regards
Oliver
Quoted 4 lines
if (
likely(stru->pointer))results in an ugly warning about using pointer as int. Is there something that could be done against that ?
if (likely(stru->pointer == NULL))
Perhaps ?
Quoted 8 lines · Alan Cox
Quoted 4 lines
if (
likely(stru->pointer))results in an ugly warning about using pointer as int. Is there something that could be done against that ?
if (likely(stru->pointer == NULL))Perhaps ?
That works. But it's so much work to type it.
Regards
Oliver
Quoted 8 lines · Alan Cox
Quoted 5 lines
if (
likely(stru->pointer))results in an ugly warning about using pointer as int. Is there something that could be done against that ?
if (likely(stru->pointer == NULL))
-#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) +#define likely(x) __builtin_expect((x)!=0,1) +#define unlikely(x) __builtin_expect((x)!=0,0)
?