On Mon, 3 Mar 2008, Paul Walker wrote:
On Mon, Mar 03, 2008 at 12:20:02PM +0100, Vincent Lefevre wrote:where the condition is always true, and which doesn't trigger any warning.Not really, because I'd argue that "if (1)" shouldn't exist in checked in code. In that case, the variable will not be NULL, so why are we checking to see if it is?
Not literally "if (1)". But "if (foo)" where "foo" may be a constant expression is inarguably a valid way to construct code...
-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net