Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings

This commit is contained in:
Thilo Schulz 2011-07-29 12:27:00 +00:00
parent 1ea7ab1f42
commit 23f6fd1633
85 changed files with 246 additions and 496 deletions

View file

@ -930,10 +930,11 @@ Z_TagMalloc
*/
#ifdef ZONE_DEBUG
void *Z_TagMallocDebug( int size, int tag, char *label, char *file, int line ) {
int allocSize;
#else
void *Z_TagMalloc( int size, int tag ) {
#endif
int extra, allocSize;
int extra;
memblock_t *start, *rover, *new, *base;
memzone_t *zone;
@ -948,7 +949,9 @@ void *Z_TagMalloc( int size, int tag ) {
zone = mainzone;
}
#ifdef ZONE_DEBUG
allocSize = size;
#endif
//
// scan through the block list looking for the first free block
// of sufficient size
@ -1087,7 +1090,10 @@ void Z_LogZoneHeap( memzone_t *zone, char *name ) {
if (!logfile || !FS_Initialized())
return;
size = allocSize = numBlocks = 0;
size = numBlocks = 0;
#ifdef ZONE_DEBUG
allocSize = 0;
#endif
Com_sprintf(buf, sizeof(buf), "\r\n================\r\n%s log\r\n================\r\n", name);
FS_Write(buf, strlen(buf), logfile);
for (block = zone->blocklist.next ; block->next != &zone->blocklist; block = block->next) {
@ -3105,7 +3111,6 @@ void Com_Frame( void ) {
else
minMsec = 1;
timeVal = 0;
do
{
if(com_sv_running->integer)