silence all gcc warnings

This commit is contained in:
Russ Cox
2005-11-07 17:13:41 +00:00
parent 7732ac0a9b
commit 1c8b499228
47 changed files with 192 additions and 128 deletions

View File

@ -8,7 +8,7 @@
* necessary to back up the input stream up one byte after calling charstod.
*/
#define ADVANCE *s++ = c; if(s>=e) return NaN(); c = (*f)(vp)
#define ADVANCE *s++ = c; if(s>=e) return __NaN(); c = (*f)(vp)
double
charstod(int(*f)(void*), void *vp)
@ -45,34 +45,34 @@ charstod(int(*f)(void*), void *vp)
}else if(s == start && (c == 'i' || c == 'I')){
ADVANCE;
if(c != 'n' && c != 'N')
return NaN();
return __NaN();
ADVANCE;
if(c != 'f' && c != 'F')
return NaN();
return __NaN();
ADVANCE;
if(c != 'i' && c != 'I')
return NaN();
return __NaN();
ADVANCE;
if(c != 'n' && c != 'N')
return NaN();
return __NaN();
ADVANCE;
if(c != 'i' && c != 'I')
return NaN();
return __NaN();
ADVANCE;
if(c != 't' && c != 'T')
return NaN();
return __NaN();
ADVANCE;
if(c != 'y' && c != 'Y')
return NaN();
return __NaN();
ADVANCE; /* so caller can back up uniformly */
USED(c);
}else if(s == str && (c == 'n' || c == 'N')){
ADVANCE;
if(c != 'a' && c != 'A')
return NaN();
return __NaN();
ADVANCE;
if(c != 'n' && c != 'N')
return NaN();
return __NaN();
ADVANCE; /* so caller can back up uniformly */
USED(c);
}

View File

@ -22,7 +22,7 @@ lock(Lock *lk)
return;
for(i=0; i<100; i++) {
osyield(0);
osyield();
if(canlock(lk))
return;
}

View File

@ -521,7 +521,7 @@ xcmp(char *a, char *b)
{
int c1, c2;
while(c1 = *b++) {
while((c1 = *b++)) {
c2 = *a++;
if(isupper(c2))
c2 = tolower(c2);

View File

@ -19,7 +19,7 @@ utfutf(char *s1, char *s2)
return strstr(s1, s2);
n2 = strlen(s2);
for(p=s1; p=utfrune(p, f); p+=n1)
for(p=s1; (p=utfrune(p, f)); p+=n1)
if(strncmp(p, s2, n2) == 0)
return p;
return 0;