[splint-discuss] How to check Uninitialized variable

Ludolf Holzheid lholzheid at bihl-wiedemann.de
Tue May 12 06:39:26 PDT 2009


On Tue, 2009-05-12 15:16:03 +0200, Nido wrote:
> Here's a hack I used for another project
> 
> /* Yes this is meant to be uninitialised */
> unsigned int seed = (unsigned int)&seed;

Maybe you meant `seed' to be un-initialized, but you actually
initialized it to `some arbitrary number not equal to zero'. The same
could be achieved with e.g. "unsigned int seed = 17;".

;-)

Ludolf

-- 

---------------------------------------------------------------
Ludolf Holzheid             Tel:    +49 621 339960
Bihl+Wiedemann GmbH         Fax:    +49 621 3392239
Floßwörthstraße 41          e-mail: lholzheid at bihl-wiedemann.de
D-68199 Mannheim, Germany
---------------------------------------------------------------



More information about the splint-discuss mailing list