enable gcc to check arguments of printf-like functions
Check printf-like functions like conoutf, if format strings and argument lists match. This commit also fixes a lot of code parts that actually had mismatching argument lists - or did things, that this check does not like. numtime() was rewritten in an ugly but very portable fashion (it's recommended to stay away from "long long" format entries, because errors usually only come up at runtime). (some code was copied from sauer)
This commit is contained in:
@@ -1066,7 +1066,7 @@ void entinmap(physent *d) // brute force but effective way to find a free spa
|
||||
}
|
||||
// leave ent at original pos, possibly stuck
|
||||
d->resetinterp();
|
||||
conoutf("can't find entity spawn spot! (%d, %d)", d->o.x, d->o.y);
|
||||
conoutf("can't find entity spawn spot! (%d, %d)", int(d->o.x), int(d->o.y));
|
||||
}
|
||||
|
||||
void vecfromyawpitch(float yaw, float pitch, int move, int strafe, vec &m)
|
||||
|
||||
Reference in New Issue
Block a user