[Freeciv-Dev] Re: [patches] freeing NULL ptrs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
Cheers,
RossW
=====
At 04:02 PM 01/08/19 +0200, Raimar Falke wrote:
>On Fri, Aug 17, 2001 at 09:50:47PM -0700, Kevin Brown wrote:
>> One comment: it looks like handle_free_failure will always drop core
>> unless the assert() is nooped out by defining NDEBUG (which also
>> happened to break other things as of 1.11.4. Haven't looked at the
>> current sources to see if that remains the case). I'd say if you put
>> the assert() within an #ifdef DEBUG block then you'll be all set.
>
>Let the action (warning and dropping core or warning only) be depend
>on IS_DEVEL_VERSION and/or IS_BETA_VERSION from common/version.h.
>
>Could the dropping core be make explicit "assert(0);"?
>
> Raimar
>--
> email: rf13@xxxxxxxxxxxxxxxxx
[Freeciv-Dev] Re: [patches] freeing NULL ptrs, David Pfitzner, 2001/08/17
|
|