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

                 Summary: fit_nationset_to_players(): 'least_misfits' may be
used uninitialized in this function
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Dec 28 23:05:39 2013
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.5.0,2.6.0

    _______________________________________________________

Details:

Split from bug #21370:

CC plrhand.lo
cc1: warnings being treated as errors
plrhand.c: In function ‘fit_nationset_to_players’:
plrhand.c:2227: error: ‘least_misfits’ may be used uninitialized in this
function

"Ubuntu 10.4 and gcc version 4.4.3."

Don't think the warning is correct -- it's protected by another variable
'best' -- but the compiler hasn't spotted this. (There is a potential use of
invalid data, best==NULL, if nation_set_count()==0, but that should never
happen.)
Some sort of warning suppression required.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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