URL:
<http://gna.org/bugs/?23993>
Summary: Clang 3.7 warnings in trunk
Project: Freeciv
Submitted by: louis94
Submitted on: mar. 27 oct. 2015 21:31:48 UTC
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:
There are three of them (release build):
In city.c
city.c:1426:43: warning: implicit conversion from enumeration type 'enum
diplrel_other' to different enumeration type 'enum citytile_type'
[-Wenum-conversion]
tile_is_foreign.source.value.citytile = DRO_FOREIGN;
~ ^~~~~~~~~~~
In nation.c
nation.c:69:20: warning: unused function 'nation_check' [-Wunused-function]
static inline bool nation_check(const struct nation_type *pnation,
^
In autosettlers.c
autosettlers.c:888:7: warning: variable 'best_act' is used uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
if (unit_has_type_flag(punit, UTYF_SETTLERS)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
autosettlers.c:901:38: note: uninitialized use occurs here
best_tile, best_act, &best_target,
^~~~~~~~
autosettlers.c:888:3: note: remove the 'if' if its condition is always true
if (unit_has_type_flag(punit, UTYF_SETTLERS)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
autosettlers.c:837:3: note: variable 'best_act' is declared here
enum unit_activity best_act;
^
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?23993>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev