]> sourceware.org Git - glibc.git/commitdiff
Fix warnings
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 21 Mar 2015 03:49:44 +0000 (04:49 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 21 Mar 2015 03:49:44 +0000 (04:49 +0100)
* sysdeps/mach/hurd/Makefile ($(common-objpfx)errnos.d): Depend on
libc-modules.h
* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Remove
unused declaration of _hurd_intr_rpc_msg_in_trap.
* mach/mach_init.c (__mach_init): Test whether HAVE_HOST_PAGE_SIZE is
defined instead of whether it is non-zero.
* sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Use "+m"
input constraint instead of both input and output constraint.  Use ecx
clobber instead of %ecx.
* sysdeps/mach/hurd/malloc-machine.h (mutex_init, mutex_lock,
mutex_unlock): Use a statement expression instead of an expression list.
* sysdeps/mach/hurd/setitimer.c (_hurd_itimer_thread_stack_size): Set
type to vm_size_t instead of vm_address_t.
* sysdeps/mach/hurd/fork.c (__fork): Test whether STACK_GROWTH_UP is
defined instead of whether it is non-zero.
* hurd/hurd/ioctl.h (_hurd_locked_install_cttyid): New declaration.
* sysdeps/mach/hurd/setsid.c: Include <hurd/ioctl.h>.
* sysdeps/mach/hurd/mmap.c (__mmap): Use 0 instead of NULL for
comparisons with mapaddr.
* nscd/nscd-client.h: Include <time.h>.
* sysdeps/mach/hurd/dl-sysdep.c (fmh): Pass vm_offset_t dummy
9th parameter to __vm_region instead of int.

12 files changed:
ChangeLog
hurd/hurd/ioctl.h
mach/mach_init.c
nscd/nscd-client.h
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/fork.c
sysdeps/mach/hurd/i386/intr-msg.h
sysdeps/mach/hurd/i386/trampoline.c
sysdeps/mach/hurd/malloc-machine.h
sysdeps/mach/hurd/mmap.c
sysdeps/mach/hurd/setitimer.c
sysdeps/mach/hurd/setsid.c

index 95b8bfb04fffe85b165213b98b6c00c7e89363e1..1c32a95496a58777d32fa4a51963e0615b2f80df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,26 @@
 
        * sysdeps/mach/hurd/Makefile ($(common-objpfx)errnos.d): Depend on
        libc-modules.h
+       * sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Remove
+       unused declaration of _hurd_intr_rpc_msg_in_trap.
+       * mach/mach_init.c (__mach_init): Test whether HAVE_HOST_PAGE_SIZE is
+       defined instead of whether it is non-zero.
+       * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Use "+m"
+       input constraint instead of both input and output constraint.  Use ecx
+       clobber instead of %ecx.
+       * sysdeps/mach/hurd/malloc-machine.h (mutex_init, mutex_lock,
+       mutex_unlock): Use a statement expression instead of an expression list.
+       * sysdeps/mach/hurd/setitimer.c (_hurd_itimer_thread_stack_size): Set
+       type to vm_size_t instead of vm_address_t.
+       * sysdeps/mach/hurd/fork.c (__fork): Test whether STACK_GROWTH_UP is
+       defined instead of whether it is non-zero.
+       * hurd/hurd/ioctl.h (_hurd_locked_install_cttyid): New declaration.
+       * sysdeps/mach/hurd/setsid.c: Include <hurd/ioctl.h>.
+       * sysdeps/mach/hurd/mmap.c (__mmap): Use 0 instead of NULL for
+       comparisons with mapaddr.
+       * nscd/nscd-client.h: Include <time.h>.
+       * sysdeps/mach/hurd/dl-sysdep.c (fmh): Pass vm_offset_t dummy
+       9th parameter to __vm_region instead of int.
 
 2015-03-19  Roland McGrath  <roland@hack.frob.com>
 
index 1f8b610f58876c2dd88706c9185a98a6c9bb9a3c..47714263209e0794743983f139c2baedd5c81dd8 100644 (file)
@@ -68,6 +68,11 @@ extern int hurd_register_ioctl_handler (int first_request, int last_request,
   _HURD_HANDLE_IOCTLS_1 (handler, ioctl, ioctl, ioctl##_only)
 
 
+/* Install a new CTTYID port, atomically updating the dtable appropriately.
+   This consumes the send right passed in.  */
+
+void _hurd_locked_install_cttyid (mach_port_t cttyid);
+
 /* Lookup the handler for the given ioctl request.  */
 
 ioctl_handler_t _hurd_lookup_ioctl_handler (int request);
index b8bef518e6073a92db10c8bd0160aec94dc4a222..cf8ac3bb318b057a533f52e9fdde9e771d4b36e5 100644 (file)
@@ -36,7 +36,7 @@ __mach_init (void)
   __mach_task_self_ = (__mach_task_self) ();
   __mig_init (0);
 
-#if HAVE_HOST_PAGE_SIZE
+#ifdef HAVE_HOST_PAGE_SIZE
   if (err = __host_page_size (__mach_host_self (), &__vm_page_size))
     _exit (err);
 #else
index ae6dc4b203984bbc440043903cf83f61b5b2ae6c..43a8c6101496733ca8546031d0bb3991c79afbda 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
+#include <time.h>
 #include <sys/types.h>
 #include <atomic.h>
 #include <nscd-types.h>
index 084624a7efa40c12c92809e8d49b042ca871267e..8bb9fad090db910b3b51f6f48acd14f0915289e2 100644 (file)
@@ -96,9 +96,9 @@ static vm_size_t fmhs;
 static void unfmh(void){
 __vm_deallocate(__mach_task_self(),fmha,fmhs);}
 static void fmh(void) {
-    error_t err;int x;mach_port_t p;
+    error_t err;int x;vm_offset_t o;mach_port_t p;
     vm_address_t a=0x08000000U,max=VM_MAX_ADDRESS;
-    while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&x))){
+    while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&o))){
       __mach_port_deallocate(__mach_task_self(),p);
       if (a+fmhs>=0x80000000U){
        max=a; break;}
index f3c26150c23b2db62feff6425379a50fce4ae38b..04d81e1d1d0073510d0eb4aac7de7a970de9d359 100644 (file)
@@ -507,7 +507,7 @@ __fork (void)
                                    MACHINE_THREAD_STATE_FLAVOR,
                                    (natural_t *) &state, &statecount))
        LOSE;
-#if STACK_GROWTH_UP
+#ifdef STACK_GROWTH_UP
 #define THREADVAR_SPACE (__hurd_threadvar_max \
                         * sizeof *__hurd_sightread_variables)
       if (__hurd_sigthread_stack_base == 0)
index a0268c1b39c333e46d2a609f650515c51aa60de7..0be995c53b62ad0ac336005ab83805b3599e4717 100644 (file)
@@ -33,9 +33,9 @@
        "_hurd_intr_rpc_msg_do_trap:    lcall $7, $0 # status in %0\n"        \
        "_hurd_intr_rpc_msg_in_trap:    movl %%ecx, %%esp\n"                  \
        "_hurd_intr_rpc_msg_sp_restored:"                                     \
-       : "=a" (err), "=m" (option), "=m" (timeout)                           \
-       : "m" ((&msg)[-1]), "1" (option), "2" (timeout)                       \
-       : "%ecx");                                                            \
+       : "=a" (err), "+m" (option), "+m" (timeout)                           \
+       : "m" ((&msg)[-1])                                                    \
+       : "ecx");                                                             \
   err;                                                                       \
 })
 
index 89041cc7f6583e73db8818a9c2a6333cbbbf301b..2dffd1382c95c8e7bee353c3a8008c2cdd5aff67 100644 (file)
@@ -35,7 +35,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
   void trampoline (void);
   void rpc_wait_trampoline (void);
   void firewall (void);
-  extern const void _hurd_intr_rpc_msg_in_trap;
   extern const void _hurd_intr_rpc_msg_cx_sp;
   extern const void _hurd_intr_rpc_msg_sp_restored;
   void *volatile sigsp;
index f7fb96e9b968e331a1b96c51714d386566cb0ea8..d69d82be8ea0f4b766bd415de6211cd7d4963415 100644 (file)
 #define mutex_t struct mutex
 
 #undef mutex_init
-#define mutex_init(m) (__mutex_init(m), 0)
+#define mutex_init(m) ({ __mutex_init(m); 0; })
 
 #undef mutex_lock
-#define mutex_lock(m) (__mutex_lock(m), 0)
+#define mutex_lock(m) ({ __mutex_lock(m); 0; })
 
 #undef mutex_unlock
-#define mutex_unlock(m) (__mutex_unlock(m), 0)
+#define mutex_unlock(m) ({ __mutex_unlock(m); 0; })
 
 #define mutex_trylock(m) (!__mutex_trylock(m))
 
index 393008f2fe0b3f3e1d6df8144dcb2124073588b1..139f27ad306382a8030d310e29dbd3ed0c3b0ed4 100644 (file)
@@ -48,8 +48,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
       && prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
     {
       /* vm_allocate has (a little) less overhead in the kernel too.  */
-      err = __vm_allocate (__mach_task_self (), &mapaddr, len,
-                          mapaddr == NULL);
+      err = __vm_allocate (__mach_task_self (), &mapaddr, len, mapaddr == 0);
 
       if (err == KERN_NO_SPACE)
        {
@@ -61,7 +60,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
              if (!err)
                err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
            }
-         else if (mapaddr != NULL)
+         else if (mapaddr != 0)
            err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
        }
 
@@ -145,7 +144,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 
   err = __vm_map (__mach_task_self (),
                  &mapaddr, (vm_size_t) len, (vm_address_t) 0,
-                 mapaddr == NULL,
+                 mapaddr == 0,
                  memobj, (vm_offset_t) offset,
                  ! (flags & MAP_SHARED),
                  vmprot, VM_PROT_ALL,
@@ -167,7 +166,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
                            (flags & MAP_SHARED) ? VM_INHERIT_SHARE
                            : VM_INHERIT_COPY);
        }
-      else if (mapaddr != NULL)
+      else if (mapaddr != 0)
        err = __vm_map (__mach_task_self (),
                        &mapaddr, (vm_size_t) len, (vm_address_t) 0,
                        1, memobj, (vm_offset_t) offset,
index f88c939dbade1e1da01ce9a2899d2e3ddd7e249c..aeaf3d7c4d8f3cdaacd814f09ee4dd2983756b7e 100644 (file)
@@ -33,7 +33,7 @@ mach_port_t _hurd_itimer_port;        /* Port the timer thread blocks on.  */
 thread_t _hurd_itimer_thread;  /* Thread waiting for timeout.  */
 int _hurd_itimer_thread_suspended; /* Nonzero if that thread is suspended.  */
 vm_address_t _hurd_itimer_thread_stack_base; /* Base of its stack.  */
-vm_address_t _hurd_itimer_thread_stack_size; /* Size of its stack.  */
+vm_size_t _hurd_itimer_thread_stack_size; /* Size of its stack.  */
 struct timeval _hurd_itimer_started; /* Time the thread started waiting.  */
 
 static void
index be17ca2604f916cc4da9e36e9ecb605658da67ea..2b792fcf931a6e224f88ece76a1c3caea92859dd 100644 (file)
@@ -20,6 +20,7 @@
 #include <hurd.h>
 #include <hurd/port.h>
 #include <hurd/fd.h>
+#include <hurd/ioctl.h>
 
 /* Create a new session with the calling process as its leader.
    The process group IDs of the session and the calling process
This page took 0.128929 seconds and 5 git commands to generate.