[quake3-commits] r2135 - in trunk/code: qcommon sys tools/asm tools/lcc/cpp tools/lcc/etc tools/lcc/src
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Aug 5 09:33:15 EDT 2011
Author: thilo
Date: 2011-08-05 09:33:15 -0400 (Fri, 05 Aug 2011)
New Revision: 2135
Modified:
trunk/code/qcommon/q_shared.c
trunk/code/sys/con_tty.c
trunk/code/tools/asm/q3asm.c
trunk/code/tools/lcc/cpp/include.c
trunk/code/tools/lcc/cpp/tokens.c
trunk/code/tools/lcc/etc/lcc.c
trunk/code/tools/lcc/src/bytecode.c
Log:
Bug 5146 - Remove last of warnings under gcc 4.6.1 for Linux, patch by q3urt.undead at gmail.com
Modified: trunk/code/qcommon/q_shared.c
===================================================================
--- trunk/code/qcommon/q_shared.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/qcommon/q_shared.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -706,12 +706,11 @@
qboolean Q_isanumber( const char *s )
{
char *p;
- double d;
if( *s == '\0' )
return qfalse;
- d = strtod( s, &p );
+ strtod( s, &p );
return *p == '\0';
}
Modified: trunk/code/sys/con_tty.c
===================================================================
--- trunk/code/sys/con_tty.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/sys/con_tty.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -88,14 +88,13 @@
static void CON_Back( void )
{
char key;
- size_t size;
key = '\b';
- size = write(STDOUT_FILENO, &key, 1);
+ write(STDOUT_FILENO, &key, 1);
key = ' ';
- size = write(STDOUT_FILENO, &key, 1);
+ write(STDOUT_FILENO, &key, 1);
key = '\b';
- size = write(STDOUT_FILENO, &key, 1);
+ write(STDOUT_FILENO, &key, 1);
}
/*
@@ -146,13 +145,12 @@
ttycon_hide--;
if (ttycon_hide == 0)
{
- size_t size;
- size = write(STDOUT_FILENO, "]", 1);
+ write(STDOUT_FILENO, "]", 1);
if (TTY_con.cursor)
{
for (i=0; i<TTY_con.cursor; i++)
{
- size = write(STDOUT_FILENO, TTY_con.buffer+i, 1);
+ write(STDOUT_FILENO, TTY_con.buffer+i, 1);
}
}
}
@@ -329,7 +327,6 @@
int avail;
char key;
field_t *history;
- size_t size;
if(ttycon_on)
{
@@ -359,8 +356,8 @@
Q_strncpyz(text, TTY_con.buffer, sizeof(text));
Field_Clear(&TTY_con);
key = '\n';
- size = write(1, &key, 1);
- size = write( 1, "]", 1 );
+ write(1, &key, 1);
+ write( 1, "]", 1 );
return text;
}
if (key == '\t')
@@ -424,7 +421,7 @@
TTY_con.buffer[TTY_con.cursor] = key;
TTY_con.cursor++;
// print the current line (this is differential)
- size = write(STDOUT_FILENO, &key, 1);
+ write(STDOUT_FILENO, &key, 1);
}
return NULL;
Modified: trunk/code/tools/asm/q3asm.c
===================================================================
--- trunk/code/tools/asm/q3asm.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/tools/asm/q3asm.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -950,12 +950,11 @@
ASM(ENDPROC)
{
- int v, v2;
if ( !strcmp( token, "endproc" ) ) {
STAT("ENDPROC");
Parse(); // skip the function name
- v = ParseValue(); // locals
- v2 = ParseValue(); // arg marshalling
+ ParseValue(); // locals
+ ParseValue(); // arg marshalling
// all functions must leave something on the opstack
instructionCount++;
Modified: trunk/code/tools/lcc/cpp/include.c
===================================================================
--- trunk/code/tools/lcc/cpp/include.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/tools/lcc/cpp/include.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -40,7 +40,7 @@
{
char fname[256], iname[256];
Includelist *ip;
- int angled, len, wlen, fd, i;
+ int angled, len, fd, i;
trp->tp += 1;
if (trp->tp>=trp->lp)
@@ -92,9 +92,9 @@
break;
}
if ( Mflag>1 || (!angled&&Mflag==1) ) {
- wlen = write(1,objname,strlen(objname));
- wlen = write(1,iname,strlen(iname));
- wlen = write(1,"\n",1);
+ write(1,objname,strlen(objname));
+ write(1,iname,strlen(iname));
+ write(1,"\n",1);
}
if (fd >= 0) {
if (++incdepth > 10)
Modified: trunk/code/tools/lcc/cpp/tokens.c
===================================================================
--- trunk/code/tools/lcc/cpp/tokens.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/tools/lcc/cpp/tokens.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -290,7 +290,7 @@
puttokens(Tokenrow *trp)
{
Token *tp;
- int len, wlen;
+ int len;
uchar *p;
if (verbose)
@@ -305,15 +305,15 @@
}
if (len>OBS/2) { /* handle giant token */
if (wbp > wbuf)
- wlen = write(1, wbuf, wbp-wbuf);
- wlen = write(1, (char *)p, len);
+ write(1, wbuf, wbp-wbuf);
+ write(1, (char *)p, len);
wbp = wbuf;
} else {
memcpy(wbp, p, len);
wbp += len;
}
if (wbp >= &wbuf[OBS]) {
- wlen = write(1, wbuf, OBS);
+ write(1, wbuf, OBS);
if (wbp > &wbuf[OBS])
memcpy(wbuf, wbuf+OBS, wbp - &wbuf[OBS]);
wbp -= OBS;
@@ -327,9 +327,8 @@
void
flushout(void)
{
- int wlen;
if (wbp>wbuf) {
- wlen = write(1, wbuf, wbp-wbuf);
+ write(1, wbuf, wbp-wbuf);
wbp = wbuf;
}
}
Modified: trunk/code/tools/lcc/etc/lcc.c
===================================================================
--- trunk/code/tools/lcc/etc/lcc.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/tools/lcc/etc/lcc.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -813,10 +813,9 @@
char *stringf(const char *fmt, ...) {
char buf[1024];
va_list ap;
- int n;
va_start(ap, fmt);
- n = vsprintf(buf, fmt, ap);
+ vsprintf(buf, fmt, ap);
va_end(ap);
return strsave(buf);
}
Modified: trunk/code/tools/lcc/src/bytecode.c
===================================================================
--- trunk/code/tools/lcc/src/bytecode.c 2011-08-05 12:11:27 UTC (rev 2134)
+++ trunk/code/tools/lcc/src/bytecode.c 2011-08-05 13:33:15 UTC (rev 2135)
@@ -261,8 +261,7 @@
length = filelength( f );
sourceFile = malloc( length + 1 );
if ( sourceFile ) {
- size_t size;
- size = fread( sourceFile, length, 1, f );
+ fread( sourceFile, length, 1, f );
sourceFile[length] = 0;
}
More information about the quake3-commits
mailing list