aboutsummaryrefslogtreecommitdiff
path: root/src/libsunrpc
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2012-10-21 11:25:08 -0400
committerRuss Cox <rsc@swtch.com>2012-10-21 11:25:08 -0400
commit0cfb376070a4bef7b4168a9795e025437e1be79f (patch)
tree9cea2b3befd9183d11ccc0745a81658d5956e4d7 /src/libsunrpc
parent34d629c8572518afe0a1d5698d7b184938e35a8f (diff)
downloadplan9port-0cfb376070a4bef7b4168a9795e025437e1be79f.tar.gz
plan9port-0cfb376070a4bef7b4168a9795e025437e1be79f.tar.bz2
plan9port-0cfb376070a4bef7b4168a9795e025437e1be79f.zip
fix clang warnings reported by Tuncer Ayaz
R=rsc http://codereview.appspot.com/6744054
Diffstat (limited to 'src/libsunrpc')
-rw-r--r--src/libsunrpc/fmt.c2
-rw-r--r--src/libsunrpc/mount3.c1
-rw-r--r--src/libsunrpc/prog.c8
-rw-r--r--src/libsunrpc/server.c2
4 files changed, 6 insertions, 7 deletions
diff --git a/src/libsunrpc/fmt.c b/src/libsunrpc/fmt.c
index 492497d5..a210c671 100644
--- a/src/libsunrpc/fmt.c
+++ b/src/libsunrpc/fmt.c
@@ -52,7 +52,7 @@ suncallfmt(Fmt *f)
p = fmtProg[i];
if(p->prog == c->rpc.prog && p->vers == c->rpc.vers){
runlock(&fmtLock);
- if(c->type < 0 || c->type >= p->nproc || (fmt=p->proc[c->type].fmt) == nil)
+ if((int32)c->type < 0 || c->type >= p->nproc || (fmt=p->proc[c->type].fmt) == nil)
return fmtprint(f, "unknown proc %c%d", "TR"[c->type&1], c->type>>1);
(*fmt)(f, c);
return 0;
diff --git a/src/libsunrpc/mount3.c b/src/libsunrpc/mount3.c
index 3729b22f..d487c806 100644
--- a/src/libsunrpc/mount3.c
+++ b/src/libsunrpc/mount3.c
@@ -131,7 +131,6 @@ nfsmount3rmntsize(NfsMount3RMnt *x)
a = a + 4 + 4 * x->nauth;
break;
}
- a = a;
return a;
}
uint
diff --git a/src/libsunrpc/prog.c b/src/libsunrpc/prog.c
index 5258e3e9..aa5d0fd8 100644
--- a/src/libsunrpc/prog.c
+++ b/src/libsunrpc/prog.c
@@ -11,7 +11,7 @@ suncallpack(SunProg *prog, uchar *a, uchar *ea, uchar **pa, SunCall *c)
if(pa == nil)
pa = &x;
- if(c->type < 0 || c->type >= prog->nproc || (pack=prog->proc[c->type].pack) == nil)
+ if((int32)c->type < 0 || c->type >= prog->nproc || (pack=prog->proc[c->type].pack) == nil)
return SunProcUnavail;
if((*pack)(a, ea, pa, c) < 0)
return SunGarbageArgs;
@@ -26,7 +26,7 @@ suncallunpack(SunProg *prog, uchar *a, uchar *ea, uchar **pa, SunCall *c)
if(pa == nil)
pa = &x;
- if(c->type < 0 || c->type >= prog->nproc || (unpack=prog->proc[c->type].unpack) == nil)
+ if((int32)c->type < 0 || c->type >= prog->nproc || (unpack=prog->proc[c->type].unpack) == nil)
return SunProcUnavail;
if((*unpack)(a, ea, pa, c) < 0){
fprint(2, "%ud %d: '%.*H' unpack failed\n", prog->prog, c->type, (int)(ea-a), a);
@@ -45,7 +45,7 @@ suncallunpackalloc(SunProg *prog, SunCallType type, uchar *a, uchar *ea, uchar *
if(pa == nil)
pa = &x;
- if(type < 0 || type >= prog->nproc || (unpack=prog->proc[type].unpack) == nil)
+ if((int32)type < 0 || type >= prog->nproc || (unpack=prog->proc[type].unpack) == nil)
return SunProcUnavail;
size = prog->proc[type].sizeoftype;
if(size == 0)
@@ -68,7 +68,7 @@ suncallsize(SunProg *prog, SunCall *c)
{
uint (*size)(SunCall*);
- if(c->type < 0 || c->type >= prog->nproc || (size=prog->proc[c->type].size) == nil)
+ if((int32)c->type < 0 || c->type >= prog->nproc || (size=prog->proc[c->type].size) == nil)
return ~0;
return (*size)(c);
}
diff --git a/src/libsunrpc/server.c b/src/libsunrpc/server.c
index 43b0f773..6e024fca 100644
--- a/src/libsunrpc/server.c
+++ b/src/libsunrpc/server.c
@@ -216,7 +216,7 @@ sunmsgreplyerror(SunMsg *m, SunStatus error)
bp = emalloc(n);
ep = bp+n;
p = bp;
- if(sunrpcpack(p, ep, &p, &m->rpc) < 0){
+ if((int32)sunrpcpack(p, ep, &p, &m->rpc) < 0){
fprint(2, "sunrpcpack failed\n");
sunmsgdrop(m);
return 0;