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
|
@ -124,7 +124,7 @@ pdump(void)
|
|||
if (player->god)
|
||||
pr(" ");
|
||||
time(&now);
|
||||
pr("DUMP PLANES %d\n", now);
|
||||
pr("DUMP PLANES %ld\n", (long)now);
|
||||
if (player->god)
|
||||
pr("own ");
|
||||
pr("id");
|
||||
|
@ -212,7 +212,7 @@ pdump(void)
|
|||
while (field[n]) {
|
||||
switch (field[n++]) {
|
||||
case 1:
|
||||
pr(" %0.4s", plchr[(int)plane.pln_type].pl_name);
|
||||
pr(" %.4s", plchr[(int)plane.pln_type].pl_name);
|
||||
break;
|
||||
case 2:
|
||||
pr(" %d", xrel(natp, plane.pln_x));
|
||||
|
@ -285,7 +285,7 @@ pdump(void)
|
|||
break;
|
||||
case 20:
|
||||
if (plane.pln_nuketype != -1) {
|
||||
pr(" %0.5s", nchr[(int)plane.pln_nuketype].n_name);
|
||||
pr(" %.5s", nchr[(int)plane.pln_nuketype].n_name);
|
||||
break;
|
||||
} else
|
||||
pr(" N/A");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue