MSVC: compile cleanly with level 4 warnings

This commit is contained in:
Enno Rehling 2014-08-14 19:39:45 +02:00
parent 804734d013
commit 158d4f8d4b
4 changed files with 8 additions and 8 deletions

View File

@ -2322,9 +2322,9 @@ static double horsebonus(const unit * u)
if (skl < 1) return 0.0;
it_horse = (rtype = get_resourcetype(R_HORSE)) ? rtype->itype : 0;
it_elvenhorse = (rtype = get_resourcetype(R_UNICORN)) ? rtype->itype : 0;
it_charger = (rtype = get_resourcetype(R_CHARGER)) ? rtype->itype : 0;
it_horse = ((rtype = get_resourcetype(R_HORSE))!=NULL) ? rtype->itype : 0;
it_elvenhorse = ((rtype = get_resourcetype(R_UNICORN))!=NULL) ? rtype->itype : 0;
it_charger = ((rtype = get_resourcetype(R_CHARGER))!=NULL) ? rtype->itype : 0;
for (itm=u->items; itm; itm = itm->next) {
if (itm->type->flags & ITF_ANIMAL) {

View File

@ -69,7 +69,7 @@ void free_borders(void)
}
}
connection *find_border(unsigned int id)
connection *find_border(int id)
{
int key;
for (key = 0; key != BORDER_MAXHASH; key++) {

View File

@ -89,7 +89,7 @@ extern "C" {
struct border_type *next; /* for internal use only */
} border_type;
extern connection *find_border(unsigned int id);
extern connection *find_border(int id);
int resolve_borderid(variant data, void *addr);
extern void free_borders(void);

View File

@ -420,9 +420,9 @@ static int canride(unit * u)
const item_type *it_horse, *it_elvenhorse, *it_charger;
const resource_type *rtype;
it_horse = (rtype = get_resourcetype(R_HORSE)) ? rtype->itype : 0;
it_elvenhorse = (rtype = get_resourcetype(R_UNICORN)) ? rtype->itype : 0;
it_charger = (rtype = get_resourcetype(R_CHARGER)) ? rtype->itype : 0;
it_horse = ((rtype = get_resourcetype(R_HORSE))!=NULL) ? rtype->itype : 0;
it_elvenhorse = ((rtype = get_resourcetype(R_UNICORN)) != NULL) ? rtype->itype : 0;
it_charger = ((rtype = get_resourcetype(R_CHARGER)) != NULL) ? rtype->itype : 0;
for (itm = u->items; itm; itm = itm->next) {
if (itm->type == it_horse || itm->type == it_charger) {