From dfbe467eda17d720ba33b83a0482a3fd03d52aa8 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Sat, 20 Jul 2013 12:43:50 +1000 Subject: [PATCH] libmach,lib9: override unused parameter warnings (fixes windows build) R=golang-dev, dave CC=golang-dev https://golang.org/cl/11620044 --- src/lib9/_p9dir.c | 3 +++ src/lib9/dirfwstat.c | 2 ++ src/lib9/windows.c | 1 + src/libmach/windows.c | 16 ++++++++++++++++ 4 files changed, 22 insertions(+) diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c index a226556f5b..d65edcfbfb 100644 --- a/src/lib9/_p9dir.c +++ b/src/lib9/_p9dir.c @@ -43,6 +43,9 @@ _p9dir(struct stat *lst, struct stat *st, char *name, Dir *d, char **str, char * char tmp[20]; int sz, fd; +#ifdef _WIN32 + USED(lst); +#endif fd = -1; USED(fd); sz = 0; diff --git a/src/lib9/dirfwstat.c b/src/lib9/dirfwstat.c index d0afe7d710..e32ddeaea2 100644 --- a/src/lib9/dirfwstat.c +++ b/src/lib9/dirfwstat.c @@ -48,6 +48,8 @@ futimes(int fd, struct timeval *tv) static int futimes(int fd, struct timeval *tv) { + USED(fd); + USED(tv); werrstr("futimes not available"); return -1; } diff --git a/src/lib9/windows.c b/src/lib9/windows.c index d8ee402a2c..082f33997a 100644 --- a/src/lib9/windows.c +++ b/src/lib9/windows.c @@ -14,6 +14,7 @@ fork(void) int p9rfork(int flags) { + USED(flags); return -1; } diff --git a/src/libmach/windows.c b/src/libmach/windows.c index aea7bace07..9ffc3af011 100644 --- a/src/libmach/windows.c +++ b/src/libmach/windows.c @@ -7,6 +7,8 @@ int ctlproc(int pid, char *msg) { + USED(pid); + USED(msg); sysfatal("ctlproc unimplemented in Windows"); return -1; } @@ -14,6 +16,7 @@ ctlproc(int pid, char *msg) char* proctextfile(int pid) { + USED(pid); sysfatal("proctextfile unimplemented in Windows"); return nil; } @@ -21,6 +24,7 @@ proctextfile(int pid) char* procstatus(int pid) { + USED(pid); sysfatal("procstatus unimplemented in Windows"); return nil; } @@ -28,6 +32,8 @@ procstatus(int pid) Map* attachproc(int pid, Fhdr *fp) { + USED(pid); + USED(fp); sysfatal("attachproc unimplemented in Windows"); return nil; } @@ -35,12 +41,16 @@ attachproc(int pid, Fhdr *fp) void detachproc(Map *m) { + USED(m); sysfatal("detachproc unimplemented in Windows"); } int procthreadpids(int pid, int *p, int np) { + USED(pid); + USED(p); + USED(np); sysfatal("procthreadpids unimplemented in Windows"); return -1; } @@ -59,6 +69,10 @@ pread(int fd, void *buf, int count, int offset) int pwrite(int fd, void *buf, int count, int offset) { + USED(fd); + USED(buf); + USED(count); + USED(offset); sysfatal("pwrite unimplemented in Windows"); return -1; } @@ -66,6 +80,8 @@ pwrite(int fd, void *buf, int count, int offset) int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) { + USED(rqtp); + USED(rmtp); sysfatal("nanosleep unimplemented in Windows"); return -1; } -- 2.48.1