Use gcc function attribute `format' to catch bad format strings. Fix
them. From Marc Olzheim. Type modifier 'l' was missing in many places, probably rendering the server useless on 64-bit hosts. (ef_flush, ef_write, ef_extend, lwpCreate, lwpDestroy): Use conversion specifier 'p' to print pointers. (check_market): Fix display of loan amount. (doland): Fix unescaped '%' (undefined behavior). (ldump, ndump, pdump, sdump): Don't use flag '0' with conversion specifier 's' (undefined behavior). (dump, ldump, lost, ndump, pdump, sdump, empth_create, update_sched): Cast time_t and pthread_t to long for printing. (lwpStackCheck, lwpStackCheckUsed, finish_sects): Insert cast to fix argument type on all platforms. (prod): Remove extra argument. (perform_mission, airdamage, retreat_land1, lwpReschedule): Format string missed arguments.
This commit is contained in:
parent
735adbf41b
commit
e7d75b2279
38 changed files with 106 additions and 93 deletions
|
@ -649,7 +649,7 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
|||
"%s fires at %s %s at %s\n",
|
||||
prship(sp), cname(victim), s, xyas(x, y, sp->shp_own));
|
||||
|
||||
mpr(victim, "%s fires at you at %s\n",
|
||||
mpr(victim, "%s %s fires at you at %s\n",
|
||||
cname(sp->shp_own), prship(sp), xyas(x, y, victim));
|
||||
|
||||
sp->shp_item[I_SHELL] = shell - gun;
|
||||
|
@ -1473,7 +1473,7 @@ air_damage(struct emp_qelem *bombers, coord x, coord y, int mission,
|
|||
if (nukedam) {
|
||||
if (mission == MI_INTERDICT) {
|
||||
wu(0, pp->pln_own,
|
||||
"\t\tnuclear warhead does %d damage to %s %s\n",
|
||||
"\t\tnuclear warhead on plane %s does %d damage to %s %s\n",
|
||||
prplane(pp), nukedam, cname(victim), s);
|
||||
dam += nukedam;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue