forked from github/server
soem warnings removed
This commit is contained in:
parent
39247a6133
commit
a7f70db795
|
@ -141,4 +141,4 @@ checkpasswd(faction * f, const char * passwd)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1835,7 +1835,7 @@ writeunit(FILE * F, const unit * u)
|
|||
|
||||
for (i=0;i!=u->skill_size;++i) {
|
||||
skill * sv = u->skills+i;
|
||||
assert(sv->level>=0 && sv->weeks>=0 && sv->weeks<=sv->level*2+1);
|
||||
assert(sv->weeks<=sv->level*2+1);
|
||||
if (sv->level>0) {
|
||||
wi(F, sv->id);
|
||||
wi(F, sv->level);
|
||||
|
@ -1890,7 +1890,7 @@ readregion(FILE * F, int x, int y)
|
|||
while (r->attribs) a_remove(&r->attribs, r->attribs);
|
||||
if (r->land) {
|
||||
free(r->land); /* mem leak */
|
||||
r->land->demands;
|
||||
r->land->demands = 0; /* mem leak */
|
||||
}
|
||||
while (r->resources) {
|
||||
rawmaterial * rm = r->resources;
|
||||
|
@ -2341,4 +2341,4 @@ writefaction(FILE * F, const faction * f)
|
|||
#if RELEASE_VERSION>=GROUPS_VERSION
|
||||
write_groups(F, f->groups);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -696,7 +696,7 @@ transfermen(unit * u, unit * u2, int n)
|
|||
if (sn==NULL) sn = add_skill(u2, sk);
|
||||
sn->level = (unsigned char)level;
|
||||
sn->weeks = (unsigned char)weeks;
|
||||
assert(sn->level>=0 && sn->weeks>0 && sn->weeks<=sn->level*2+1);
|
||||
assert(sn->weeks>0 && sn->weeks<=sn->level*2+1);
|
||||
} else if (sn) {
|
||||
sk_set(sn, 0);
|
||||
}
|
||||
|
@ -863,7 +863,6 @@ get_skill(const unit * u, skill_t sk)
|
|||
{
|
||||
skill * sv = u->skills;
|
||||
while (sv!=u->skills+u->skill_size) {
|
||||
assert(sv->level>=0 && sv->weeks>=0);
|
||||
if (sv->id==sk) return sv;
|
||||
++sv;
|
||||
}
|
||||
|
@ -875,7 +874,6 @@ has_skill(const unit * u, skill_t sk)
|
|||
{
|
||||
skill * sv = u->skills;
|
||||
while (sv!=u->skills+u->skill_size) {
|
||||
assert(sv->level>=0 && sv->weeks>=0);
|
||||
if (sv->id==sk) {
|
||||
return (sv->level>0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue