From 7cb1e441c2077e1f293302a9f7b0c7c864af3ea8 Mon Sep 17 00:00:00 2001 From: tma Date: Sun, 25 Oct 2009 23:44:20 +0000 Subject: * Fix some warnings in lcc compile git-svn-id: svn://svn.icculus.org/quake3/trunk@1708 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/tools/lcc/cpp/tokens.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'code/tools/lcc/cpp/tokens.c') diff --git a/code/tools/lcc/cpp/tokens.c b/code/tools/lcc/cpp/tokens.c index 147569b..90ea47f 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; + int len, wlen; uchar *p; if (verbose) @@ -305,15 +305,15 @@ puttokens(Tokenrow *trp) } if (len>OBS/2) { /* handle giant token */ if (wbp > wbuf) - write(1, wbuf, wbp-wbuf); - write(1, (char *)p, len); + wlen = write(1, wbuf, wbp-wbuf); + wlen = write(1, (char *)p, len); wbp = wbuf; } else { memcpy(wbp, p, len); wbp += len; } if (wbp >= &wbuf[OBS]) { - write(1, wbuf, OBS); + wlen = write(1, wbuf, OBS); if (wbp > &wbuf[OBS]) memcpy(wbuf, wbuf+OBS, wbp - &wbuf[OBS]); wbp -= OBS; @@ -327,8 +327,9 @@ puttokens(Tokenrow *trp) void flushout(void) { + int wlen; if (wbp>wbuf) { - write(1, wbuf, wbp-wbuf); + wlen = write(1, wbuf, wbp-wbuf); wbp = wbuf; } } -- cgit v1.2.3