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:
ac-stef
2015-08-02 19:40:41 +02:00
parent b2845b7c15
commit 826499c12d
20 changed files with 77 additions and 71 deletions
+1 -1
View File
@@ -1025,7 +1025,7 @@ int processdownload(package *pck)
{
const char *pckname = findfile(path(pck->name, true), "w+");
// with textures/sounds, the image/audio file itself is sent. Just need to copy it from the temporary file
if(rename(tmpname, pckname)) conoutf("\f3failed to install", pckname);
if(rename(tmpname, pckname)) conoutf("\f3failed to install %s", pckname);
if(pck->type == PCK_TEXTURE) rereadtexturelists = 1;
else rereadsoundlists = 1;
break;