aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-10-25 23:44:20 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-10-25 23:44:20 +0000
commit7cb1e441c2077e1f293302a9f7b0c7c864af3ea8 (patch)
tree3ed8b2647dada77a68e455479a8b7ae16d806b53
parent3e8753057670d8970c086f8344afe0979191b397 (diff)
downloadioquake3-aero-7cb1e441c2077e1f293302a9f7b0c7c864af3ea8.zip
ioquake3-aero-7cb1e441c2077e1f293302a9f7b0c7c864af3ea8.tar.gz
* Fix some warnings in lcc compile
git-svn-id: svn://svn.icculus.org/quake3/trunk@1708 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/tools/lcc/cpp/include.c8
-rw-r--r--code/tools/lcc/cpp/tokens.c11
2 files changed, 10 insertions, 9 deletions
diff --git a/code/tools/lcc/cpp/include.c b/code/tools/lcc/cpp/include.c
index 1bb8847..331a0b4 100644
--- a/code/tools/lcc/cpp/include.c
+++ b/code/tools/lcc/cpp/include.c
@@ -40,7 +40,7 @@ doinclude(Tokenrow *trp)
{
char fname[256], iname[256];
Includelist *ip;
- int angled, len, fd, i;
+ int angled, len, wlen, fd, i;
trp->tp += 1;
if (trp->tp>=trp->lp)
@@ -92,9 +92,9 @@ doinclude(Tokenrow *trp)
break;
}
if ( Mflag>1 || (!angled&&Mflag==1) ) {
- write(1,objname,strlen(objname));
- write(1,iname,strlen(iname));
- write(1,"\n",1);
+ wlen = write(1,objname,strlen(objname));
+ wlen = write(1,iname,strlen(iname));
+ wlen = 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 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;
}
}