silence various warnings

This commit is contained in:
rsc 2005-08-11 17:33:43 +00:00
parent 01d1f4cb4b
commit bcac59d81b
13 changed files with 18 additions and 24 deletions

View file

@ -336,10 +336,8 @@ timefmt(Fmt *fmt)
if((long)(time0-u) < 6*30*86400) if((long)(time0-u) < 6*30*86400)
return fmtprint(fmt, "%s %2d %02d:%02d", return fmtprint(fmt, "%s %2d %02d:%02d",
mon[tm->mon], tm->mday, tm->hour, tm->min); mon[tm->mon], tm->mday, tm->hour, tm->min);
else
return fmtprint(fmt, "%s %2d %5d", return fmtprint(fmt, "%s %2d %5d",
mon[tm->mon], tm->mday, tm->year+1900); mon[tm->mon], tm->mday, tm->year+1900);
return 0;
} }
static int static int

View file

@ -105,7 +105,7 @@ convgetrpc(Conv *c, int want)
return &c->rpc; return &c->rpc;
rpcrespond(c, "phase in state '%s' want '%s'", c->state, rpcname[want]); rpcrespond(c, "phase in state '%s' want '%s'", c->state, rpcname[want]);
} }
return nil; /* not reached */ /* not reached */
} }
/* read until the done function tells us that's enough */ /* read until the done function tells us that's enough */

View file

@ -159,7 +159,7 @@ readlist(int off, int (*gen)(int, char*, uint), Req *r)
a += n; a += n;
off++; off++;
} }
return -1; /* not reached */ /* not reached */
} }
static int static int

View file

@ -157,7 +157,7 @@ yylook(void){
if(debug)putchar('\n'); if(debug)putchar('\n');
# endif # endif
} }
return(0); /* shut up the compiler; i have no idea what should be returned */ /* not reached */
} }
int int
yyback(int *p, int m) yyback(int *p, int m)

View file

@ -102,5 +102,4 @@ main(int argc, char **argv)
break; break;
} }
} }
exits(nil);
} }

View file

@ -88,7 +88,6 @@ getcmdstr(void)
} }
} }
} }
return nil;
} }
static char * static char *

View file

@ -591,7 +591,6 @@ main(int argc, char *argv[])
} else if(affix[0] != 0 && affix[0] != '.') } else if(affix[0] != 0 && affix[0] != '.')
print("%s\t%s\n", affix, original); print("%s\t%s\n", affix, original);
} }
exits(0);
} }
/* strip exactly one suffix and do /* strip exactly one suffix and do

View file

@ -75,17 +75,17 @@ enum
/* /*
* magic numbers on disk * magic numbers on disk
*/ */
_ClumpMagic = 0xd15cb10c, /* clump header, deprecated */ _ClumpMagic = 0xd15cb10cU, /* clump header, deprecated */
ClumpFreeMagic = 0, /* free clump; terminates active clump log */ ClumpFreeMagic = 0, /* free clump; terminates active clump log */
ArenaPartMagic = 0xa9e4a5e7, /* arena partition header */ ArenaPartMagic = 0xa9e4a5e7U, /* arena partition header */
ArenaMagic = 0xf2a14ead, /* arena trailer */ ArenaMagic = 0xf2a14eadU, /* arena trailer */
ArenaHeadMagic = 0xd15c4ead, /* arena header */ ArenaHeadMagic = 0xd15c4eadU, /* arena header */
BloomMagic = 0xb1004ead, /* bloom filter header */ BloomMagic = 0xb1004eadU, /* bloom filter header */
BloomMaxHash = 32, BloomMaxHash = 32,
ISectMagic = 0xd15c5ec7, /* index header */ ISectMagic = 0xd15c5ec7U, /* index header */
ArenaPartVersion = 3, ArenaPartVersion = 3,
ArenaVersion4 = 4, ArenaVersion4 = 4,

View file

@ -29,5 +29,4 @@ passtokey(char *key, char *p)
} }
encrypt(key, t, 8); encrypt(key, t, 8);
} }
return 1; /* not reached */
} }

View file

@ -348,7 +348,6 @@ mimeok(Hlex *h, char *name, int multipart, HContent *head)
} }
lex(h); lex(h);
} }
return head;
} }
/* /*
@ -387,7 +386,6 @@ mimeetag(Hlex *h, HETag *head)
if(lex(h) != ',') if(lex(h) != ',')
return head; return head;
} }
return head;
} }
/* /*
@ -840,8 +838,7 @@ top:
} }
return Word; return Word;
} }
goto top; /* not reached */
return 0;
} }
/* /*

View file

@ -285,7 +285,6 @@ getword(HConnect *c)
} }
ch = getc(c); ch = getc(c);
} }
return nil;
} }
static int static int

View file

@ -390,6 +390,6 @@ dexec(DwarfBuf *b, State *s, int locstop)
return -1; return -1;
} }
} }
return -1; /* not reached */ /* not reached */
} }

View file

@ -81,8 +81,12 @@ vtversion(VtConn *z)
vtdebug(z, "version string in: %s", buf); vtdebug(z, "version string in: %s", buf);
p = buf+strlen(prefix); p = buf+strlen(prefix);
for(;;){ for(; *p; p=pp){
if(*p == ':' || *p == '-')
p++;
pp = strpbrk(p, ":-"); pp = strpbrk(p, ":-");
if(pp == nil)
pp = p+strlen(p);
for(i=0; okvers[i]; i++) for(i=0; okvers[i]; i++)
if(strlen(okvers[i]) == pp-p && memcmp(okvers[i], p, pp-p) == 0){ if(strlen(okvers[i]) == pp-p && memcmp(okvers[i], p, pp-p) == 0){
*pp = 0; *pp = 0;