aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2005-01-08 03:02:08 +0000
committerH. Peter Anvin <hpa@zytor.com>2005-01-08 03:02:08 +0000
commit2cba991ac1f593ebb68782045c0ddb546e1134c0 (patch)
treefdb5f7e609a4acff21fe1acf9194fe092aa67a43
parenta0293189cb80ab509937a7f07e3342535dea8076 (diff)
downloadklibc-2cba991ac1f593ebb68782045c0ddb546e1134c0.tar.gz
Fix warningsklibc-0.196
-rw-r--r--klibc/memrchr.c3
-rw-r--r--nfsmount/mount.c2
-rw-r--r--nfsmount/sunrpc.c7
3 files changed, 7 insertions, 5 deletions
diff --git a/klibc/memrchr.c b/klibc/memrchr.c
index c612fa67ff056..10d9c298513e4 100644
--- a/klibc/memrchr.c
+++ b/klibc/memrchr.c
@@ -7,7 +7,8 @@
void *memrchr(const void *s, int c, size_t n)
{
- const unsigned char *sp = s + n - 1;
+ const unsigned char *sp =
+ (const unsigned char *)s + n - 1;
while ( n-- ) {
if ( *sp == (unsigned char)c )
diff --git a/nfsmount/mount.c b/nfsmount/mount.c
index 7f7f25b65fed3..8ff72bcbcf8f8 100644
--- a/nfsmount/mount.c
+++ b/nfsmount/mount.c
@@ -166,7 +166,7 @@ static int mount_call(__u32 proc, __u32 version,
goto bail;
if (rpc.reply_len < MNT_REPLY_MINSIZE) {
- fprintf(stderr, "incomplete reply: %d < %d\n",
+ fprintf(stderr, "incomplete reply: %zu < %zu\n",
rpc.reply_len, MNT_REPLY_MINSIZE);
goto bail;
}
diff --git a/nfsmount/sunrpc.c b/nfsmount/sunrpc.c
index 4b65920a59f13..3307a0f26191d 100644
--- a/nfsmount/sunrpc.c
+++ b/nfsmount/sunrpc.c
@@ -25,7 +25,7 @@ static int rpc_do_reply(struct client *clnt, struct rpc *rpc, size_t off)
goto bail;
}
else if (ret < sizeof(struct rpc_reply) - off) {
- fprintf(stderr, "short read: %d < %d\n", ret,
+ fprintf(stderr, "short read: %d < %zu\n", ret,
sizeof(struct rpc_reply) - off);
goto bail;
}
@@ -71,7 +71,8 @@ static int rpc_call_tcp(struct client *clnt, struct rpc *rpc)
goto bail;
}
else if (ret < rpc->call_len) {
- fprintf(stderr, "short write: %d < %d\n", ret, rpc->call_len);
+ fprintf(stderr, "short write: %d < %zu\n",
+ ret, rpc->call_len);
goto bail;
}
@@ -111,7 +112,7 @@ static int rpc_call_udp(struct client *clnt, struct rpc *rpc)
goto bail;
}
else if (ret < rpc->call_len) {
- fprintf(stderr, "short write: %d < %d\n", ret,
+ fprintf(stderr, "short write: %d < %zu\n", ret,
rpc->call_len);
goto bail;
}