In a default ROM makefile (if I'm not mistaken) it'll automatically
show you if it's not set before used ( gcc -Wall ....)

However, there is no real difference (except in optimization) between:

char arg[MSL] = '\0';

&&

char arg[MSL];
arg[0] = '\0';

(or even:  arg[0] = 'a';  or whatever assignment you want)

So in that case, nope, no real way that I'm aware of to have the
compiler check that to see if it's been "initialized before it's assigned"...

(assignment is just initialization after the creation anyway ;) )

Hope this helps,

--
Jamie Harrell               |  [EMAIL PROTECTED]
                                  |  URL: None at this time.
ICQ: 2985611              |  AIM: Liquidicie
--
"A computer scientist is someone who, when told to 'Go to Hell',
            sees the 'go to', rather than the destination, as harmful."
--

*********** REPLY SEPARATOR  ***********

On 1/6/2002 at 5:47 PM ArKHaM wrote:

>Hello again list,
>     I am running on Mandrake linux box and was wondering if there was a
>way
>to make the compiler more picky.  Want I want is the compiler to check each
>_user_made_ variable for initialization before it's assigned or used.
>Mainly the argument values in functions.  IE:
>
>void do_foo(CHAR_DATA *foo, char *THISargument)
>
>char arg[MSL];
>
>I want it to check for:
>
>arg[0] = '\0';
>
>the initilization of the arg variable.  Can this be done with Makefile?  Or
>do I need root access?
>
>Arkham
>
>
>
>--
>ROM mailing list
>[email protected]
>http://www.rom.org/cgi-bin/mailman/listinfo/rom




Reply via email to