Re: [PATCH] eliminate gcc warnings on assert [__builtin_expect]

From: Roland Dreier
Date: Sat Aug 23 2003 - 00:27:04 EST


>>>>> "Randy" == Randy Dunlap <Randy.Dunlap> writes:

Randy> Building genksyms on ia64 (gcc 3.3.1) produces these
Randy> warnings:

[...]

Randy> Is there a problem with coercing the pointer parameter to
Randy> be (int)?

Doesn't this produce "warning: cast from pointer to integer of different size"?
It would be better to do something like "!!__ptr" or "__ptr != 0" to
test if the pointer is NULL. (This was discussed to death recently on LKML)

- R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/