[splint-discuss] How to check Uninitialized variable
Aaron Davies
aaron.davies at gmail.com
Tue May 12 07:27:56 PDT 2009
On Tue, May 12, 2009 at 9:39 PM, Ludolf Holzheid
<lholzheid at bihl-wiedemann.de> wrote:
> 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;".
>
> ;-)
Isn't it non-deterministic though? Given the name, I assume that's
what he was trying to achieve.
--
Aaron Davies
aaron.davies at gmail.com
More information about the splint-discuss
mailing list