-Werror patch

Jamie Wilkinson jaq at spacepants.org
Tue Sep 6 05:47:54 EDT 2005


If you add -Werror to the CFLAGS, only one showstopper appears with GCC 3.3
on Ubuntu.

This patch changes the format arg to an int from a longint, given that the
argument is passed in as an int and the other operand is cast to int *, this
seems reasonable.
-------------- next part --------------
Index: code/qcommon/vm.c
===================================================================
--- code/qcommon/vm.c	(revision 84)
+++ code/qcommon/vm.c	(working copy)
@@ -852,7 +852,7 @@
 		f = fopen("syscalls.log", "w" );
 	}
 	callnum++;
-	fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, args - (int *)currentVM->dataBase,
+	fprintf(f, "%i: %i (%i) = %i %i %i %i\n", callnum, args - (int *)currentVM->dataBase,
 		args[0], args[1], args[2], args[3], args[4] );
 }
 


More information about the quake3 mailing list