Commit 02991bb9 authored by Dave Cheney's avatar Dave Cheney

libmach: trivial: resolve unused parameter warnings

Fix a bunch of warnings detected by https://golang.org/cl/8090044

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10483044
parent 793bb6cc
...@@ -391,6 +391,7 @@ detachproc(Map *m) ...@@ -391,6 +391,7 @@ detachproc(Map *m)
int int
procnotes(int pid, char ***pnotes) procnotes(int pid, char ***pnotes)
{ {
USED(pid);
*pnotes = 0; *pnotes = 0;
return 0; return 0;
} }
...@@ -400,6 +401,7 @@ procnotes(int pid, char ***pnotes) ...@@ -400,6 +401,7 @@ procnotes(int pid, char ***pnotes)
char* char*
proctextfile(int pid) proctextfile(int pid)
{ {
USED(pid);
return nil; return nil;
} }
...@@ -410,6 +412,8 @@ machsegrw(Map *map, Seg *seg, uvlong addr, void *v, uint n, int isr) ...@@ -410,6 +412,8 @@ machsegrw(Map *map, Seg *seg, uvlong addr, void *v, uint n, int isr)
mach_port_t task; mach_port_t task;
int r; int r;
USED(seg);
task = idtotask(map->pid); task = idtotask(map->pid);
if(task == -1) if(task == -1)
return -1; return -1;
...@@ -544,6 +548,8 @@ machregrw(Map *map, Seg *seg, uvlong addr, void *v, uint n, int isr) ...@@ -544,6 +548,8 @@ machregrw(Map *map, Seg *seg, uvlong addr, void *v, uint n, int isr)
} u; } u;
uchar *p; uchar *p;
USED(seg);
if(n > 8){ if(n > 8){
werrstr("asked for %d-byte register", n); werrstr("asked for %d-byte register", n);
return -1; return -1;
...@@ -711,6 +717,9 @@ catch_exception_raise(mach_port_t eport, mach_port_t thread, ...@@ -711,6 +717,9 @@ catch_exception_raise(mach_port_t eport, mach_port_t thread,
Thread *t; Thread *t;
int i; int i;
USED(eport);
USED(task);
t = nil; t = nil;
for(i=0; i<nthr; i++){ for(i=0; i<nthr; i++){
if(thr[i].thread == thread){ if(thr[i].thread == thread){
...@@ -751,6 +760,7 @@ havet: ...@@ -751,6 +760,7 @@ havet:
static void* static void*
excthread(void *v) excthread(void *v)
{ {
USED(v);
extern boolean_t exc_server(mach_msg_header_t *, mach_msg_header_t *); extern boolean_t exc_server(mach_msg_header_t *, mach_msg_header_t *);
mach_msg_server(exc_server, 2048, excport, 0); mach_msg_server(exc_server, 2048, excport, 0);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment