[Freeciv-Dev] [bug #15412] Duff assertion in city_unit_unhappiness()

2010-02-22 Thread Jacob Nevins

Update of bug #15412 (project freeciv):

  Status:  Ready For Test = In Progress


___

Reply to this item at:

  http://gna.org/bugs/?15412

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15412] Duff assertion in city_unit_unhappiness()

2010-02-22 Thread Jacob Nevins

Follow-up Comment #2, bug #15412 (project freeciv):

Also fixed in S2_2 in r16896 (I screwed up the commit message).

___

Reply to this item at:

  http://gna.org/bugs/?15412

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15412] Duff assertion in city_unit_unhappiness()

2010-02-22 Thread Jacob Nevins

Update of bug #15412 (project freeciv):

 Planned Release: = 2.2.1  


___

Reply to this item at:

  http://gna.org/bugs/?15412

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15412] Duff assertion in city_unit_unhappiness()

2010-02-22 Thread Jacob Nevins

Update of bug #15412 (project freeciv):

  Status: In Progress = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?15412

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15412] Duff assertion in city_unit_unhappiness()

2010-02-17 Thread Jacob Nevins

URL:
  http://gna.org/bugs/?15412

 Summary: Duff assertion in city_unit_unhappiness()
 Project: Freeciv
Submitted by: jtn
Submitted on: Thursday 18/02/10 at 01:27
Category: None
Severity: 2 - Minor
Priority: 1 - Later
  Status: Ready For Test
 Assigned to: jtn
Originator Email: 
 Open/Closed: Open
 Release: 2.2.0-RC1
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Code looks like:


int city_unit_unhappiness(..., int *free_unhappy)
{
  ...
  if (... || !free_unhappy || ...) {
return 0;
  }
  assert(free_unhappy = 0);
  ...
}


The assertion will probably never fire since it's the pointer being compared
to 0, not its contents, so this is harmless. (Unless there's some platform
where likely pointers look like negative numbers in such a comparison, in
which case it'll fire spuriously.)

Attached patch fixes to presumed intent.



___

File Attachments:


---
Date: Thursday 18/02/10 at 01:27  Name: S2_2-free_unhappy-assertion.diff 
Size: 393B   By: jtn

http://gna.org/bugs/download.php?file_id=8156

___

Reply to this item at:

  http://gna.org/bugs/?15412

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev