diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c index 9f74e237..213f1c89 100644 --- a/code/qcommon/q_shared.c +++ b/code/qcommon/q_shared.c @@ -706,12 +706,11 @@ int Q_isalpha( int c ) 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'; } diff --git a/code/sys/con_tty.c b/code/sys/con_tty.c index 7f5f6317..6934aa20 100644 --- a/code/sys/con_tty.c +++ b/code/sys/con_tty.c @@ -88,14 +88,13 @@ send "\b \b" 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 @@ static void CON_Show( void ) 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; itp += 1; if (trp->tp>=trp->lp) @@ -92,9 +92,9 @@ doinclude(Tokenrow *trp) 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) diff --git a/code/tools/lcc/cpp/tokens.c b/code/tools/lcc/cpp/tokens.c index ad9f2f7c..3570896c 100644 --- a/code/tools/lcc/cpp/tokens.c +++ b/code/tools/lcc/cpp/tokens.c @@ -290,7 +290,7 @@ void puttokens(Tokenrow *trp) { Token *tp; - int len, wlen; + int len; uchar *p; if (verbose) @@ -305,15 +305,15 @@ puttokens(Tokenrow *trp) } 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 @@ puttokens(Tokenrow *trp) void flushout(void) { - int wlen; if (wbp>wbuf) { - wlen = write(1, wbuf, wbp-wbuf); + write(1, wbuf, wbp-wbuf); wbp = wbuf; } } diff --git a/code/tools/lcc/etc/lcc.c b/code/tools/lcc/etc/lcc.c index a1688525..8595f2b0 100644 --- a/code/tools/lcc/etc/lcc.c +++ b/code/tools/lcc/etc/lcc.c @@ -813,10 +813,9 @@ char *strsave(const char *str) { 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); } diff --git a/code/tools/lcc/src/bytecode.c b/code/tools/lcc/src/bytecode.c index e83429fc..871056a0 100644 --- a/code/tools/lcc/src/bytecode.c +++ b/code/tools/lcc/src/bytecode.c @@ -261,8 +261,7 @@ static void LoadSourceFile( const char *filename ) { 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; }