Summary: Uninitialised variable in Gtk message options
Submitted by: jtn
Submitted on: Sun Jan 29 18:33:42 2012
Severity: 2 - Minor
Priority: 5 - Normal
Status: In Progress
Assigned to: jtn
Discussion Lock: Any
Operating System: Any
Planned Release: 2.3.2
(One of a set of bugs spotted by user "Bit" on the forum
<http://forum.freeciv.org/viewtopic.php?t=7287> when compiling with VC.)
In create_messageopt_dialog(), the variable "i" is used uninitialised in "n =
(i % NUM_LISTS)".
However, since NUM_LISTS is currently always 1, we get away with it -- n is
always 0 regardless of the value of i.
(This appears to be a compile-time option to display the many message options
in several columns, or similar. But it wouldn't have worked since i is never
incremented either, so I fixed that too.)
(I tried setting NUM_LISTS to 2 and was slightly alarmed that my GCC still
didn't warn me about this...)
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list