diff --git a/servers/avfs/device.c b/servers/avfs/device.c index 2f2f33b97..21b42dddc 100644 --- a/servers/avfs/device.c +++ b/servers/avfs/device.c @@ -597,9 +597,9 @@ PUBLIC int tty_opcl( *===========================================================================*/ PUBLIC int ctty_opcl( int op, /* operation, DEV_OPEN or DEV_CLOSE */ - dev_t dev, /* device to open or close */ - endpoint_t proc_e, /* process to open/close for */ - int flags /* mode bits and flags */ + dev_t UNUSED(dev), /* device to open or close */ + endpoint_t UNUSED(proc_e), /* process to open/close for */ + int UNUSED(flags) /* mode bits and flags */ ) { /* This procedure is called from the dmap struct on opening or closing @@ -747,9 +747,10 @@ message *mess_ptr; /* pointer to message for task */ /*===========================================================================* * ctty_io * *===========================================================================*/ -PUBLIC int ctty_io(task_nr, mess_ptr) -int task_nr; /* not used - for compatibility with dmap_t */ -message *mess_ptr; /* pointer to message for task */ +PUBLIC int ctty_io( + endpoint_t UNUSED(task_nr), /* not used - for compatibility with dmap_t */ + message *mess_ptr /* pointer to message for task */ +) { /* This routine is only called for one device, namely /dev/tty. Its job * is to change the message to use the controlling terminal, instead of the @@ -800,7 +801,7 @@ PUBLIC int no_dev( /*===========================================================================* * no_dev_io * *===========================================================================*/ -PUBLIC int no_dev_io(int proc, message *m) +PUBLIC int no_dev_io(endpoint_t UNUSED(proc), message *UNUSED(m)) { /* Called when doing i/o on a nonexistent device. */ printf("VFS: I/O on unmapped device number\n"); diff --git a/servers/avfs/fscall.c b/servers/avfs/fscall.c index 6098af822..257afb32e 100644 --- a/servers/avfs/fscall.c +++ b/servers/avfs/fscall.c @@ -32,10 +32,6 @@ PRIVATE struct { PRIVATE int depth = 0; /* current globals stack level */ -#if ENABLE_SYSCALL_STATS -EXTERN unsigned long calls_stats[NCALLS]; -#endif - FORWARD _PROTOTYPE( int push_globals, (void) ); FORWARD _PROTOTYPE( void pop_globals, (void) ); FORWARD _PROTOTYPE( void set_globals, (message *m) ); diff --git a/servers/avfs/main.c b/servers/avfs/main.c index 6426202c0..eccfc82a5 100644 --- a/servers/avfs/main.c +++ b/servers/avfs/main.c @@ -475,7 +475,7 @@ PRIVATE void sef_local_startup() /*===========================================================================* * sef_cb_init_fresh * *===========================================================================*/ -PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) +PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *info) { /* Initialize the virtual file server. */ int s, i; diff --git a/servers/avfs/select.c b/servers/avfs/select.c index 98c9b9c1c..b59fe6b1f 100644 --- a/servers/avfs/select.c +++ b/servers/avfs/select.c @@ -398,7 +398,8 @@ PRIVATE int select_request_async(struct filp *f, int *ops, int block) /*===========================================================================* * select_request_file * *===========================================================================*/ -PRIVATE int select_request_file(struct filp *f, int *ops, int block) +PRIVATE int select_request_file(struct filp *UNUSED(f), int *UNUSED(ops), + int UNUSED(block)) { /* Files are always ready, so output *ops is input *ops */ return(SEL_OK); diff --git a/servers/ds/store.c b/servers/ds/store.c index 3b7e06f1e..401dc15ad 100644 --- a/servers/ds/store.c +++ b/servers/ds/store.c @@ -252,7 +252,7 @@ PRIVATE int map_service(const struct rprocpub *rpub) /*===========================================================================* * sef_cb_init_fresh * *===========================================================================*/ -PUBLIC int sef_cb_init_fresh(int type, sef_init_info_t *info) +PUBLIC int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *info) { /* Initialize the data store server. */ int i, r; diff --git a/servers/pm/utility.c b/servers/pm/utility.c index 5b78ca2e2..ff4046335 100644 --- a/servers/pm/utility.c +++ b/servers/pm/utility.c @@ -106,8 +106,10 @@ PUBLIC int nice_to_priority(int nice, unsigned* new_q) *new_q = MAX_USER_Q + (nice-PRIO_MIN) * (MIN_USER_Q-MAX_USER_Q+1) / (PRIO_MAX-PRIO_MIN+1); - if (*new_q < MAX_USER_Q) *new_q = MAX_USER_Q; /* shouldn't happen */ - if (*new_q > MIN_USER_Q) *new_q = MIN_USER_Q; /* shouldn't happen */ + + /* Neither of these should ever happen. */ + if ((signed) *new_q < MAX_USER_Q) *new_q = MAX_USER_Q; + if (*new_q > MIN_USER_Q) *new_q = MIN_USER_Q; return (OK); } diff --git a/servers/procfs/main.c b/servers/procfs/main.c index 193aa94bd..d02c8ad03 100644 --- a/servers/procfs/main.c +++ b/servers/procfs/main.c @@ -69,7 +69,7 @@ PRIVATE void init_hook(void) /*===========================================================================* * main * *===========================================================================*/ -PUBLIC int main(int argc, char *argv[]) +PUBLIC int main(void) { /* ProcFS entry point. */ diff --git a/servers/procfs/tree.c b/servers/procfs/tree.c index e71513fea..404fb6fb1 100644 --- a/servers/procfs/tree.c +++ b/servers/procfs/tree.c @@ -371,7 +371,7 @@ PRIVATE void pid_read(struct inode *node) /*===========================================================================* * pid_link * *===========================================================================*/ -PRIVATE int pid_link(struct inode *node, char *ptr, int max) +PRIVATE int pid_link(struct inode *UNUSED(node), char *ptr, int UNUSED(max)) { /* The contents of a symbolic link in a PID directory are requested. * This function is a placeholder for future use. @@ -386,7 +386,8 @@ PRIVATE int pid_link(struct inode *node, char *ptr, int max) /*===========================================================================* * lookup_hook * *===========================================================================*/ -PUBLIC int lookup_hook(struct inode *parent, char *name, cbdata_t cbdata) +PUBLIC int lookup_hook(struct inode *parent, char *name, + cbdata_t UNUSED(cbdata)) { /* Path name resolution hook, for a specific parent and name pair. * If needed, update our own view of the system first; after that, @@ -432,7 +433,7 @@ PUBLIC int lookup_hook(struct inode *parent, char *name, cbdata_t cbdata) /*===========================================================================* * getdents_hook * *===========================================================================*/ -PUBLIC int getdents_hook(struct inode *node, cbdata_t cbdata) +PUBLIC int getdents_hook(struct inode *node, cbdata_t UNUSED(cbdata)) { /* Directory entry retrieval hook, for potentially all files in a * directory. Make sure that all files that are supposed to be @@ -478,7 +479,7 @@ PUBLIC int read_hook(struct inode *node, off_t off, char **ptr, * rdlink_hook * *===========================================================================*/ PUBLIC int rdlink_hook(struct inode *node, char *ptr, size_t max, - cbdata_t cbdata) + cbdata_t UNUSED(cbdata)) { /* Symbolic link resolution hook. Not used yet. */ diff --git a/servers/vfs/fscall.c b/servers/vfs/fscall.c index dc758f555..214457afb 100644 --- a/servers/vfs/fscall.c +++ b/servers/vfs/fscall.c @@ -32,10 +32,6 @@ PRIVATE struct { PRIVATE int depth = 0; /* current globals stack level */ -#if ENABLE_SYSCALL_STATS -EXTERN unsigned long calls_stats[NCALLS]; -#endif - FORWARD _PROTOTYPE( int push_globals, (void) ); FORWARD _PROTOTYPE( void pop_globals, (void) ); FORWARD _PROTOTYPE( void set_globals, (message *m) );