Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(793)

Unified Diff: src/libsunrpc/prog.c

Issue 6744054: code review 6744054: fix clang warnings reported by Tuncer Ayaz (Closed)
Patch Set: diff -r d9cdc1795924 https://code.google.com/p/plan9port Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/libsunrpc/mount3.c ('k') | src/libsunrpc/server.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libsunrpc/prog.c
===================================================================
--- a/src/libsunrpc/prog.c
+++ b/src/libsunrpc/prog.c
@@ -11,7 +11,7 @@
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 @@
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 @@
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 @@
{
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);
}
« no previous file with comments | « src/libsunrpc/mount3.c ('k') | src/libsunrpc/server.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b