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: Kevin Brown <kevin@xxxxxxxxxxxxxx>, Justin Moore <justin@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [patches] freeing NULL ptrs
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Aug 2001 20:50:03 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Aug 19, 2001 at 01:09:27PM -0400, Ross W. Wetmore 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.

I know.

> 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.

Ahh I didn't know that NDEBUG is set at certain times. From
configure.in:

if test "x$enable_debug" = "xyes"; then
  test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
  CPPFLAGS="$CPPFLAGS -DDEBUG"
else
  if test "x$enable_debug" = "xno"; then
    CPPFLAGS="$CPPFLAGS -DNDEBUG"
  fi
fi

> I.E. the solution is already there and just needs to be used.

You are right.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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