Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2005:
[Freeciv-Dev] Re: (PR#14365) battlegroups...
Home

[Freeciv-Dev] Re: (PR#14365) battlegroups...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14365) battlegroups...
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 28 Nov 2005 04:55:57 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14365 >

On Mon, 21 Nov 2005, Jason Short wrote:
> And here's a variant without the utility/ changes (which I committed).

I still cannot compile it, and it still looks like it is has bugs that
should prevent compilation with any version of gcc, like this:

bool get_chance_to_win(int *att_chance, int *def_chance, struct tile *ptile)
{
  struct unit *my_unit, *defender, *attacker;

  if (!unit_is_in_focus(my_unit)

my_unit is certainly used uninitialized here, like, always?!

This comes from the following in the patch:

   struct unit *my_unit, *defender, *attacker;

-  if (!(my_unit = get_unit_in_focus())
+  if (!unit_is_in_focus(my_unit)

How come you do not get gcc warnings from this?

  - Per






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