]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Mon Mar 20 03:19:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Mon, 20 Mar 1995 08:21:38 +0000 (08:21 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 20 Mar 1995 08:21:38 +0000 (08:21 +0000)
* stdio/vfscanf.c (%n): Use READ_IN - 1, so as not to count the
  read-ahead character.

* hurd/dtable.c, hurd/getdport.c, hurd/hurd.h, hurd/hurdexec.c,
  hurd/hurdinit.c, hurd/hurdprio.c, hurd/hurdsock.c,
  hurd/ports-get.c, hurd/ports-set.c, hurd/setauth.c,
  hurd/setuids.c, sysdeps/mach/hurd/i386/trampoline.c:
Get anal with unsigned to pacify compiler.

14 files changed:
ChangeLog
hurd/dtable.c
hurd/getdport.c
hurd/hurd.h
hurd/hurdexec.c
hurd/hurdinit.c
hurd/hurdprio.c
hurd/hurdsock.c
hurd/ports-get.c
hurd/ports-set.c
hurd/setauth.c
hurd/setuids.c
stdio/vfscanf.c
sysdeps/mach/hurd/i386/trampoline.c

index 88cdb2a86e4df9c7f38874fff6f96a56aa470e41..77df609dfd0a415aeb3406ff29e860e8f298d1a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
+Mon Mar 20 03:19:23 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+       * stdio/vfscanf.c (%n): Use READ_IN - 1, so as not to count the
+       read-ahead character.
+
 Sat Mar 18 14:07:08 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
+       * hurd/dtable.c, hurd/getdport.c, hurd/hurd.h, hurd/hurdexec.c,
+         hurd/hurdinit.c, hurd/hurdprio.c, hurd/hurdsock.c,
+         hurd/ports-get.c, hurd/ports-set.c, hurd/setauth.c,
+         hurd/setuids.c, sysdeps/mach/hurd/i386/trampoline.c:
+       Get anal with unsigned to pacify compiler.
+
        * stdio/vfscanf.c: Grok positional parameter specs (i.e. %3$d
        means %d from 3rd arg).
 
index 3e785a9710e13f36c18869c10ca000cec0c8b675..ea683d0b0df1203217fe77b97976ddbebfdf0adc 100644 (file)
@@ -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.  */
index 884deaa8681d3c726bb9aaa6085bd78e1a78a64a..2204db2ce3fad69bf29c77ce4eae142dc0310a36 100644 (file)
@@ -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;
index 472fb9173b0754c86cf4cf387f468dc7e1380c0d..968910fffb24223aadec1403eb064662ee10f673 100644 (file)
@@ -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);
index d5d2d080e4804746b3d6c37d2ca0286ab610f97d..e18107b9a75d083288b291780a6a462aec5a5385 100644 (file)
@@ -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;
index 4469a173399f509db43ed8227dd3c210124c4980..af892112b424278fc0386bfb4977cb3147d4a114 100644 (file)
@@ -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;
 
index d7beb3c97a02e6b4b31f6852d667299d352041f6..8bad2563fba5dc230783a1b09e70d2c71e6a73e9 100644 (file)
@@ -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
index 266fd40d31657aea9faf15bf9c16962b279a807c..4dc6793535a794110298f652800090381da60bb6 100644 (file)
@@ -103,7 +103,7 @@ _hurd_socket_server (int domain, int dead)
 static void
 init (void)
 {
-  size_t i;
+  int i;
 
   __mutex_init (&lock);
 
index def59731c5e6d7b3854200e59f2f77f8b1752a7f..e45494ac916b777f9fa96a71e09fcafd228ef60f 100644 (file)
@@ -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],
index fbc2940217f7f6b8d9ee69fa421004335f6e0da7..029970d5bb04a1e7202d7086208553a67f65c736 100644 (file)
@@ -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))
index 7378e4f07034602c0b0b62d450f72478e966e006..34ce7f63bb5ea608e5313d78021a5476dadfca87 100644 (file)
@@ -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.
index 3b049b010003e64ddbcf5cf5e001d4c54fffc676..572f636a4b50e7cb885895d3e0e5f87e2fa68f5e 100644 (file)
@@ -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.  */
index cacf16f4669147e98d4d71f6a3ec85a223ceefd2..cdfedc2485f0e94606c9756399ea1a3373fe57b8 100644 (file)
@@ -251,7 +251,7 @@ DEFUN(__vfscanf, (s, format, arg),
 
        case 'n':       /* Answer number of assignments done.  */
          if (do_assign)
-           *ARG (int *) = read_in;
+           *ARG (int *) = read_in - 1; /* Don't count the read-ahead.  */
          break;
 
        case 'c':       /* Match characters.  */
index 75f11457cdb0d3a466a2a3741f3b9cbfa2c1f4ee..a83a8a8e7dd63c4f43974b371d3f6611e2b43627 100644 (file)
@@ -254,7 +254,7 @@ _hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
 
   if (_hurdsig_catch_fault (SIGSEGV))
     assert (_hurdsig_fault_sigcode >= (long int) pc &&
-           _hurdsig_fault_sigcode < (long int) pc + sizeof syscall);
+           _hurdsig_fault_sigcode < (long int) (pc + sizeof syscall));
   else
     {
       int rcving = (state->basic.eax == MACH_RCV_INTERRUPTED &&