URL:
  <http://gna.org/bugs/?18086>

                 Summary: comparison is always false due to limited range of
data type
                 Project: Freeciv
            Submitted by: akfaew
            Submitted on: Sat 30 Apr 2011 08:30:27 AM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:

typedef.*citizens found in ../common/fc_types.h:
   107: typedef unsigned char citizens;

cityturn.c:696: warning: comparison is always false due to limited range of
data type
cityturn.c:699: warning: comparison is always false due to limited range of
data type
cityturn.c:829: warning: comparison is always true due to limited range of
data type
cityturn.c:829: warning: comparison is always true due to limited range of
data type

Indeed:
    692 void city_repair_size(struct city *pcity, citizens change)
    693 {
    694   if (change > 0) {
    695     pcity->specialists[DEFAULT_SPECIALIST] += change;
    696   } else if (change < 0) {




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?18086>

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


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

Reply via email to