diff options
author | rsc <devnull@localhost> | 2005-08-11 17:33:43 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-08-11 17:33:43 +0000 |
commit | bcac59d81b63c352a9073104e7e63838e117a877 (patch) | |
tree | f8a3ffb635c9d2209d42baf19c85c73eaa2d90db /src | |
parent | 01d1f4cb4b791eca0bc79bc00188bf3c688290e6 (diff) | |
download | plan9port-bcac59d81b63c352a9073104e7e63838e117a877.tar.gz plan9port-bcac59d81b63c352a9073104e7e63838e117a877.tar.bz2 plan9port-bcac59d81b63c352a9073104e7e63838e117a877.zip |
silence various warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/9p.c | 6 | ||||
-rw-r--r-- | src/cmd/auth/factotum/conv.c | 2 | ||||
-rw-r--r-- | src/cmd/auth/factotum/fs.c | 2 | ||||
-rw-r--r-- | src/cmd/lex/ncform | 2 | ||||
-rw-r--r-- | src/cmd/listen1.c | 1 | ||||
-rw-r--r-- | src/cmd/proof/screen.c | 1 | ||||
-rw-r--r-- | src/cmd/spell/sprog.c | 1 | ||||
-rw-r--r-- | src/cmd/venti/srv/dat.h | 12 | ||||
-rw-r--r-- | src/libauthsrv/passtokey.c | 1 | ||||
-rw-r--r-- | src/libhttpd/parse.c | 5 | ||||
-rw-r--r-- | src/libhttpd/parsereq.c | 1 | ||||
-rw-r--r-- | src/libmach/dwarfcfa.c | 2 | ||||
-rw-r--r-- | src/libventi/version.c | 6 |
13 files changed, 18 insertions, 24 deletions
diff --git a/src/cmd/9p.c b/src/cmd/9p.c index bace6d09..99033bc8 100644 --- a/src/cmd/9p.c +++ b/src/cmd/9p.c @@ -336,10 +336,8 @@ timefmt(Fmt *fmt) if((long)(time0-u) < 6*30*86400) return fmtprint(fmt, "%s %2d %02d:%02d", mon[tm->mon], tm->mday, tm->hour, tm->min); - else - return fmtprint(fmt, "%s %2d %5d", - mon[tm->mon], tm->mday, tm->year+1900); - return 0; + return fmtprint(fmt, "%s %2d %5d", + mon[tm->mon], tm->mday, tm->year+1900); } static int diff --git a/src/cmd/auth/factotum/conv.c b/src/cmd/auth/factotum/conv.c index a39abff5..cd9d5045 100644 --- a/src/cmd/auth/factotum/conv.c +++ b/src/cmd/auth/factotum/conv.c @@ -105,7 +105,7 @@ convgetrpc(Conv *c, int want) return &c->rpc; 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 */ diff --git a/src/cmd/auth/factotum/fs.c b/src/cmd/auth/factotum/fs.c index 698d3305..5e3a64e6 100644 --- a/src/cmd/auth/factotum/fs.c +++ b/src/cmd/auth/factotum/fs.c @@ -159,7 +159,7 @@ readlist(int off, int (*gen)(int, char*, uint), Req *r) a += n; off++; } - return -1; /* not reached */ + /* not reached */ } static int diff --git a/src/cmd/lex/ncform b/src/cmd/lex/ncform index 6571735b..64740ae7 100644 --- a/src/cmd/lex/ncform +++ b/src/cmd/lex/ncform @@ -157,7 +157,7 @@ yylook(void){ if(debug)putchar('\n'); # endif } - return(0); /* shut up the compiler; i have no idea what should be returned */ + /* not reached */ } int yyback(int *p, int m) diff --git a/src/cmd/listen1.c b/src/cmd/listen1.c index 0f9762ff..a9e1a0ae 100644 --- a/src/cmd/listen1.c +++ b/src/cmd/listen1.c @@ -102,5 +102,4 @@ main(int argc, char **argv) break; } } - exits(nil); } diff --git a/src/cmd/proof/screen.c b/src/cmd/proof/screen.c index dccfe01d..a9a7ef1f 100644 --- a/src/cmd/proof/screen.c +++ b/src/cmd/proof/screen.c @@ -88,7 +88,6 @@ getcmdstr(void) } } } - return nil; } static char * diff --git a/src/cmd/spell/sprog.c b/src/cmd/spell/sprog.c index 971848e1..0fe6794c 100644 --- a/src/cmd/spell/sprog.c +++ b/src/cmd/spell/sprog.c @@ -591,7 +591,6 @@ main(int argc, char *argv[]) } else if(affix[0] != 0 && affix[0] != '.') print("%s\t%s\n", affix, original); } - exits(0); } /* strip exactly one suffix and do diff --git a/src/cmd/venti/srv/dat.h b/src/cmd/venti/srv/dat.h index 5f6d1a3f..37c3a05b 100644 --- a/src/cmd/venti/srv/dat.h +++ b/src/cmd/venti/srv/dat.h @@ -75,17 +75,17 @@ enum /* * magic numbers on disk */ - _ClumpMagic = 0xd15cb10c, /* clump header, deprecated */ + _ClumpMagic = 0xd15cb10cU, /* clump header, deprecated */ ClumpFreeMagic = 0, /* free clump; terminates active clump log */ - ArenaPartMagic = 0xa9e4a5e7, /* arena partition header */ - ArenaMagic = 0xf2a14ead, /* arena trailer */ - ArenaHeadMagic = 0xd15c4ead, /* arena header */ + ArenaPartMagic = 0xa9e4a5e7U, /* arena partition header */ + ArenaMagic = 0xf2a14eadU, /* arena trailer */ + ArenaHeadMagic = 0xd15c4eadU, /* arena header */ - BloomMagic = 0xb1004ead, /* bloom filter header */ + BloomMagic = 0xb1004eadU, /* bloom filter header */ BloomMaxHash = 32, - ISectMagic = 0xd15c5ec7, /* index header */ + ISectMagic = 0xd15c5ec7U, /* index header */ ArenaPartVersion = 3, ArenaVersion4 = 4, diff --git a/src/libauthsrv/passtokey.c b/src/libauthsrv/passtokey.c index 8e267ce4..cde9a242 100644 --- a/src/libauthsrv/passtokey.c +++ b/src/libauthsrv/passtokey.c @@ -29,5 +29,4 @@ passtokey(char *key, char *p) } encrypt(key, t, 8); } - return 1; /* not reached */ } diff --git a/src/libhttpd/parse.c b/src/libhttpd/parse.c index de37f91c..f03e9c32 100644 --- a/src/libhttpd/parse.c +++ b/src/libhttpd/parse.c @@ -348,7 +348,6 @@ mimeok(Hlex *h, char *name, int multipart, HContent *head) } lex(h); } - return head; } /* @@ -387,7 +386,6 @@ mimeetag(Hlex *h, HETag *head) if(lex(h) != ',') return head; } - return head; } /* @@ -840,8 +838,7 @@ top: } return Word; } - goto top; - return 0; + /* not reached */ } /* diff --git a/src/libhttpd/parsereq.c b/src/libhttpd/parsereq.c index 938d0a33..98a88369 100644 --- a/src/libhttpd/parsereq.c +++ b/src/libhttpd/parsereq.c @@ -285,7 +285,6 @@ getword(HConnect *c) } ch = getc(c); } - return nil; } static int diff --git a/src/libmach/dwarfcfa.c b/src/libmach/dwarfcfa.c index d09edcb3..4980c2cf 100644 --- a/src/libmach/dwarfcfa.c +++ b/src/libmach/dwarfcfa.c @@ -390,6 +390,6 @@ dexec(DwarfBuf *b, State *s, int locstop) return -1; } } - return -1; /* not reached */ + /* not reached */ } diff --git a/src/libventi/version.c b/src/libventi/version.c index c985910f..fd1e2389 100644 --- a/src/libventi/version.c +++ b/src/libventi/version.c @@ -81,8 +81,12 @@ vtversion(VtConn *z) vtdebug(z, "version string in: %s", buf); p = buf+strlen(prefix); - for(;;){ + for(; *p; p=pp){ + if(*p == ':' || *p == '-') + p++; pp = strpbrk(p, ":-"); + if(pp == nil) + pp = p+strlen(p); for(i=0; okvers[i]; i++) if(strlen(okvers[i]) == pp-p && memcmp(okvers[i], p, pp-p) == 0){ *pp = 0; |