diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-08-05 13:33:15 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 23:26:57 +0000 |
commit | 30876f1accd3cfde76c6f52e31c869f6a95f60a8 (patch) | |
tree | d9093961aad44dae217d37f7d3a1aa8bb74ba5e6 /src | |
parent | 03c2dab55aeba17d69189a7e2e02d66cc9dd587e (diff) |
Bug 5146 - Remove last of warnings under gcc 4.6.1 for Linux, patch by q3urt.undead@gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/con_tty.c | 19 | ||||
-rw-r--r-- | src/tools/asm/q3asm.c | 5 | ||||
-rw-r--r-- | src/tools/lcc/cpp/include.c | 8 | ||||
-rw-r--r-- | src/tools/lcc/cpp/tokens.c | 11 | ||||
-rw-r--r-- | src/tools/lcc/etc/lcc.c | 3 | ||||
-rw-r--r-- | src/tools/lcc/src/bytecode.c | 3 |
6 files changed, 21 insertions, 28 deletions
diff --git a/src/sys/con_tty.c b/src/sys/con_tty.c index e4b2ad5c..8ab09256 100644 --- a/src/sys/con_tty.c +++ b/src/sys/con_tty.c @@ -90,14 +90,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); } /* @@ -148,13 +147,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; i<TTY_con.cursor; i++) { - size = write(STDOUT_FILENO, TTY_con.buffer+i, 1); + write(STDOUT_FILENO, TTY_con.buffer+i, 1); } } } @@ -331,7 +329,6 @@ char *CON_Input( void ) int avail; char key; field_t *history; - size_t size; if(ttycon_on) { @@ -361,8 +358,8 @@ char *CON_Input( void ) 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') @@ -426,7 +423,7 @@ char *CON_Input( void ) 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; diff --git a/src/tools/asm/q3asm.c b/src/tools/asm/q3asm.c index 6c4c9195..f36c6eac 100644 --- a/src/tools/asm/q3asm.c +++ b/src/tools/asm/q3asm.c @@ -951,12 +951,11 @@ STAT("PROC"); 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++; diff --git a/src/tools/lcc/cpp/include.c b/src/tools/lcc/cpp/include.c index 331a0b4f..1bb88475 100644 --- a/src/tools/lcc/cpp/include.c +++ b/src/tools/lcc/cpp/include.c @@ -40,7 +40,7 @@ doinclude(Tokenrow *trp) { 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 @@ 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/src/tools/lcc/cpp/tokens.c b/src/tools/lcc/cpp/tokens.c index ad9f2f7c..3570896c 100644 --- a/src/tools/lcc/cpp/tokens.c +++ b/src/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/src/tools/lcc/etc/lcc.c b/src/tools/lcc/etc/lcc.c index a1688525..8595f2b0 100644 --- a/src/tools/lcc/etc/lcc.c +++ b/src/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/src/tools/lcc/src/bytecode.c b/src/tools/lcc/src/bytecode.c index e83429fc..871056a0 100644 --- a/src/tools/lcc/src/bytecode.c +++ b/src/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; } |