* Fix some warnings in lcc compile

This commit is contained in:
Tim Angus 2009-10-25 23:44:20 +00:00
parent 568cf6c1dd
commit 5004ada284
2 changed files with 10 additions and 9 deletions

View File

@ -40,7 +40,7 @@ doinclude(Tokenrow *trp)
{ {
char fname[256], iname[256]; char fname[256], iname[256];
Includelist *ip; Includelist *ip;
int angled, len, fd, i; int angled, len, wlen, fd, i;
trp->tp += 1; trp->tp += 1;
if (trp->tp>=trp->lp) if (trp->tp>=trp->lp)
@ -92,9 +92,9 @@ doinclude(Tokenrow *trp)
break; break;
} }
if ( Mflag>1 || (!angled&&Mflag==1) ) { if ( Mflag>1 || (!angled&&Mflag==1) ) {
write(1,objname,strlen(objname)); wlen = write(1,objname,strlen(objname));
write(1,iname,strlen(iname)); wlen = write(1,iname,strlen(iname));
write(1,"\n",1); wlen = write(1,"\n",1);
} }
if (fd >= 0) { if (fd >= 0) {
if (++incdepth > 10) if (++incdepth > 10)

View File

@ -290,7 +290,7 @@ void
puttokens(Tokenrow *trp) puttokens(Tokenrow *trp)
{ {
Token *tp; Token *tp;
int len; int len, wlen;
uchar *p; uchar *p;
if (verbose) if (verbose)
@ -305,15 +305,15 @@ puttokens(Tokenrow *trp)
} }
if (len>OBS/2) { /* handle giant token */ if (len>OBS/2) { /* handle giant token */
if (wbp > wbuf) if (wbp > wbuf)
write(1, wbuf, wbp-wbuf); wlen = write(1, wbuf, wbp-wbuf);
write(1, (char *)p, len); wlen = write(1, (char *)p, len);
wbp = wbuf; wbp = wbuf;
} else { } else {
memcpy(wbp, p, len); memcpy(wbp, p, len);
wbp += len; wbp += len;
} }
if (wbp >= &wbuf[OBS]) { if (wbp >= &wbuf[OBS]) {
write(1, wbuf, OBS); wlen = write(1, wbuf, OBS);
if (wbp > &wbuf[OBS]) if (wbp > &wbuf[OBS])
memcpy(wbuf, wbuf+OBS, wbp - &wbuf[OBS]); memcpy(wbuf, wbuf+OBS, wbp - &wbuf[OBS]);
wbp -= OBS; wbp -= OBS;
@ -327,8 +327,9 @@ puttokens(Tokenrow *trp)
void void
flushout(void) flushout(void)
{ {
int wlen;
if (wbp>wbuf) { if (wbp>wbuf) {
write(1, wbuf, wbp-wbuf); wlen = write(1, wbuf, wbp-wbuf);
wbp = wbuf; wbp = wbuf;
} }
} }