aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti
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/cmd/venti
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/cmd/venti')
-rw-r--r--src/cmd/venti/srv/fixarenas.c4
-rw-r--r--src/cmd/venti/srv/lumpcache.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/venti/srv/fixarenas.c b/src/cmd/venti/srv/fixarenas.c
index ac05ab8c..d7ae41d3 100644
--- a/src/cmd/venti/srv/fixarenas.c
+++ b/src/cmd/venti/srv/fixarenas.c
@@ -130,12 +130,12 @@ readdisk(uchar *buf, vlong offset, int len)
int i, j, k, n;
if(offset >= partend){
- memset(buf, 0xFB, sizeof buf);
+ memset(buf, 0xFB, len);
return buf;
}
if(offset+len > partend){
- memset(buf, 0xFB, sizeof buf);
+ memset(buf, 0xFB, len);
len = partend - offset;
}
diff --git a/src/cmd/venti/srv/lumpcache.c b/src/cmd/venti/srv/lumpcache.c
index d9a6b954..93fed6d1 100644
--- a/src/cmd/venti/srv/lumpcache.c
+++ b/src/cmd/venti/srv/lumpcache.c
@@ -413,7 +413,7 @@ checklumpcache(void)
}
if(lumpcache.avail != lumpcache.allowed - size){
fprint(2, "mismatched available=%d and allowed=%d - used=%d space", lumpcache.avail, lumpcache.allowed, size);
- *(int*)0=0;
+ *(volatile int*)0=0;
}
nfree = 0;