diff options
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/dtable.c | 4 | ||||
-rw-r--r-- | hurd/getdport.c | 2 | ||||
-rw-r--r-- | hurd/hurd.h | 4 | ||||
-rw-r--r-- | hurd/hurdexec.c | 3 | ||||
-rw-r--r-- | hurd/hurdinit.c | 2 | ||||
-rw-r--r-- | hurd/hurdprio.c | 2 | ||||
-rw-r--r-- | hurd/hurdsock.c | 2 | ||||
-rw-r--r-- | hurd/ports-get.c | 6 | ||||
-rw-r--r-- | hurd/ports-set.c | 6 | ||||
-rw-r--r-- | hurd/setauth.c | 2 | ||||
-rw-r--r-- | hurd/setuids.c | 2 |
11 files changed, 17 insertions, 18 deletions
diff --git a/hurd/dtable.c b/hurd/dtable.c index 3e785a9..ea683d0 100644 --- a/hurd/dtable.c +++ b/hurd/dtable.c @@ -41,7 +41,7 @@ DEFINE_HOOK (_hurd_fd_subinit, (void)); static void init_dtable (void) { - register size_t i; + int i; __mutex_init (&_hurd_dtable_lock); @@ -55,7 +55,7 @@ init_dtable (void) __libc_fatal ("hurd: Can't allocate file descriptor table\n"); /* Initialize the descriptor table. */ - for (i = 0; i < _hurd_init_dtablesize; ++i) + for (i = 0; (unsigned int) i < _hurd_init_dtablesize; ++i) { if (_hurd_init_dtable[i] == MACH_PORT_NULL) /* An unused descriptor is marked by a null pointer. */ diff --git a/hurd/getdport.c b/hurd/getdport.c index 884deaa..2204db2 100644 --- a/hurd/getdport.c +++ b/hurd/getdport.c @@ -37,7 +37,7 @@ __getdport (int fd) /* Never had a descriptor table. */ return EBADF; - if (fd < 0 || fd > _hurd_init_dtablesize || + if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize || _hurd_init_dtable[fd] == MACH_PORT_NULL) { errno = EBADF; diff --git a/hurd/hurd.h b/hurd/hurd.h index 472fb91..968910f 100644 --- a/hurd/hurd.h +++ b/hurd/hurd.h @@ -109,8 +109,8 @@ extern int _hurd_set_brk (vm_address_t newbrk); /* Calls to get and set basic ports. */ -extern error_t _hurd_ports_get (int which, mach_port_t *result); -extern error_t _hurd_ports_set (int which, mach_port_t newport); +extern error_t _hurd_ports_get (unsigned int which, mach_port_t *result); +extern error_t _hurd_ports_set (unsigned int which, mach_port_t newport); extern process_t getproc (void); extern file_t getcwdir (void), getcrdir (void); diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c index d5d2d08..e18107b 100644 --- a/hurd/hurdexec.c +++ b/hurd/hurdexec.c @@ -40,10 +40,9 @@ _hurd_exec (task_t task, file_t file, mach_port_t ports[_hurd_nports]; struct hurd_userlink ulink_ports[_hurd_nports]; file_t *dtable; - int dtablesize; + unsigned int dtablesize, i; struct hurd_port **dtable_cells; struct hurd_userlink *ulink_dtable; - int i; char *const *p; struct hurd_sigstate *ss; mach_port_t *please_dealloc, *pdp; diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c index 4469a17..af89211 100644 --- a/hurd/hurdinit.c +++ b/hurd/hurdinit.c @@ -45,7 +45,7 @@ _hurd_init (int flags, char **argv, mach_port_t *portarray, size_t portarraysize, int *intarray, size_t intarraysize) { - int i; + size_t i; _hurd_exec_flags = flags; diff --git a/hurd/hurdprio.c b/hurd/hurdprio.c index d7beb3c..8bad256 100644 --- a/hurd/hurdprio.c +++ b/hurd/hurdprio.c @@ -67,7 +67,7 @@ _hurd_priority_which_map (enum __priority_which which, int who, (vm_address_t) oldpi, oldpisize * sizeof pi[0]); pip = (struct procinfo *) pi; - if (pip->owner != who) + if (pip->owner != (uid_t) who) continue; } else diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c index 266fd40..4dc6793 100644 --- a/hurd/hurdsock.c +++ b/hurd/hurdsock.c @@ -103,7 +103,7 @@ _hurd_socket_server (int domain, int dead) static void init (void) { - size_t i; + int i; __mutex_init (&lock); diff --git a/hurd/ports-get.c b/hurd/ports-get.c index def5973..e45494a 100644 --- a/hurd/ports-get.c +++ b/hurd/ports-get.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -32,9 +32,9 @@ error_t (*_hurd_ports_getters[INIT_PORT_MAX]) (mach_port_t *result) = }; error_t -_hurd_ports_get (int which, mach_port_t *result) +_hurd_ports_get (unsigned int which, mach_port_t *result) { - if (which < 0 || which >= _hurd_nports) + if (which >= _hurd_nports) return EINVAL; if (which >= INIT_PORT_MAX || _hurd_ports_getters[which] == NULL) return HURD_PORT_USE (&_hurd_ports[which], diff --git a/hurd/ports-set.c b/hurd/ports-set.c index fbc2940..029970d 100644 --- a/hurd/ports-set.c +++ b/hurd/ports-set.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,10 +40,10 @@ error_t (*_hurd_ports_setters[INIT_PORT_MAX]) (mach_port_t newport) = error_t -_hurd_ports_set (int which, mach_port_t newport) +_hurd_ports_set (unsigned int which, mach_port_t newport) { error_t err; - if (which < 0 || which >= _hurd_nports) + if (which >= _hurd_nports) return EINVAL; if (err = __mach_port_mod_refs (__mach_task_self (), newport, MACH_PORT_RIGHT_SEND, 1)) diff --git a/hurd/setauth.c b/hurd/setauth.c index 7378e4f..34ce7f6 100644 --- a/hurd/setauth.c +++ b/hurd/setauth.c @@ -34,7 +34,7 @@ error_t _hurd_setauth (auth_t new) { error_t err; - int d; + unsigned int d; mach_port_t newport, ref; /* Give the new send right a user reference. diff --git a/hurd/setuids.c b/hurd/setuids.c index 3b049b0..572f636 100644 --- a/hurd/setuids.c +++ b/hurd/setuids.c @@ -25,7 +25,7 @@ setuids (int n, const uid_t *uids) { error_t err; auth_t newauth; - size_t i; + int i; gid_t new[n]; /* Fault before taking locks. */ |