fix clang warnings reported by Tuncer Ayaz

R=rsc
http://codereview.appspot.com/6744054
This commit is contained in:
Russ Cox 2012-10-21 11:25:08 -04:00
parent 34d629c857
commit 0cfb376070
24 changed files with 586 additions and 588 deletions

View file

@ -1211,7 +1211,7 @@ cntledit(char *tag)
}
if(strcmp(tag, "but1")==0
|| strcmp(tag, "but2")==0){
if(buf[0]<'0' || '9'<buf[0] || (l=atoi(buf))<0 || l>255){
if(buf[0]<'0' || '9'<buf[0] || (long)(l=atoi(buf))<0 || l>255){
mesg("illegal value");
return;
}
@ -1855,7 +1855,7 @@ tchar(Thing *t)
c -= t->off;
d -= t->off;
while(c <= d){
if(c<0 || c>=t->s->n){
if((long)c<0 || c>=t->s->n){
mesg("0x%lux not in font %s", c+t->off, t->name);
return;
}