[crossfire] 64 bit crossfire musings.

Mark Wedel mwedel at sonic.net
Fri May 19 23:50:21 CDT 2006


Nicolas Weeger (Laposte) wrote:
>>   But the other issue is more that compiling spews out a fair number of
>> warnings, and the basic problem is that if too many warnings are generated,
>> people just ignore them, and there could be valid issues.
> 
> Latest tests i've done show only 2 warnings for the whole compilation, and 
> only for command_kick casting a const char* to a char* (this one is 
> harmless).
> Or maybe i'm using wrong compilation flags :)

  I use -Wall, which is probably excessive, but does tend to catch some other 
errors.

> 
> But yes, warnings should be cleaned.
> Also, I'm thinking of adding a whole lot of asserts here and there, some day 
> (would probably need to change for instance the create command to not be able 
> to generate invalid objets, else asserts would crash).

  Note that IMO, asserts should really be used to check the data of passed in 
functions from other functions.

  For data that is passed in from user input, asserts that cause crashes 
probably isn't the correct approach - instead, if the data is bad, the server 
should print a message to the player.  Right now, I think a problem is a lot of 
the DM code really didn't do much data checking of what is being passed in.




More information about the crossfire mailing list