Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [patches] freeing NULL ptrs
Home

[Freeciv-Dev] Re: [patches] freeing NULL ptrs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, Justin Moore <justin@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [patches] freeing NULL ptrs
From: Kevin Brown <kevin@xxxxxxxxxxxxxx>
Date: Sun, 19 Aug 2001 16:02:05 -0700

Ross W. Wetmore <rwetmore@xxxxxxxxxxxx> wrote:
> assert is a void function and so can only be put in code blocks as
> opposed to expressions. But a divide by zero can do the same thing
> in an expression.
> 
> These should be tied to NDEBUG to stop the proliferation of control
> variables. NDEBUG should be set on release versions and friendlier
> actions taken as alternate codepaths.
> 
> I.E. the solution is already there and just needs to be used.

I agree.  I've run into bugs where there was code in the assert() that
had side effects, but I can't find any in the 1.12.0 code (mine was
merely a cursory examination, however).


Not only that, but setting NDEBUG for releases will help us uncover
such bugs more easily in the future.  :-)



-- 
Kevin Brown                                           kevin@xxxxxxxxxxxxxx

    It's really hard to define what "unexpected behavior" means when you're
                       talking about Windows.


[Prev in Thread] Current Thread [Next in Thread]