This patch removes some `implicit function definition' and `suggest additional parentheses ...' warnings within ./vm and ./i386:
---------------------------------------------------------------------------- 2002-03-05 Michael Teichgraeber <[EMAIL PROTECTED]> * i386/i386/trap.c: Include <vm/vm_fault.h>. * vm/vm_init.c: Likewise. * vm/vm_map.c (vm_map_lookup): Made `if' clauses more pleasant to gcc. * vm/vm_map.c (vm_map_delete): Made function static; provided prototype at beginning of file. (vm_map_copyout_page_list): Likewise. Index: i386/i386/trap.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/i386/trap.c,v retrieving revision 1.4.2.3 diff -u -p -r1.4.2.3 trap.c --- i386/i386/trap.c 5 Apr 2001 06:52:46 -0000 1.4.2.3 +++ i386/i386/trap.c 5 Mar 2002 02:22:20 -0000 @@ -41,6 +41,7 @@ #include <mach/machine/thread_status.h> #include <vm/vm_kern.h> +#include <vm/vm_fault.h> #include <vm/vm_map.h> #include <kern/ast.h> Index: vm/vm_init.c =================================================================== RCS file: /cvsroot/hurd/gnumach/vm/vm_init.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 vm_init.c --- vm/vm_init.c 25 Feb 1997 21:28:36 -0000 1.1.1.1 +++ vm/vm_init.c 5 Mar 2002 02:22:35 -0000 @@ -41,6 +41,7 @@ #include <vm/vm_map.h> #include <vm/vm_page.h> #include <vm/vm_kern.h> +#include <vm/vm_fault.h> #include <vm/memory_object.h> Index: vm/vm_map.c =================================================================== RCS file: /cvsroot/hurd/gnumach/vm/vm_map.c,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 vm_map.c --- vm/vm_map.c 5 Apr 2001 06:52:47 -0000 1.2.2.1 +++ vm/vm_map.c 5 Mar 2002 02:22:41 -0000 @@ -91,7 +91,7 @@ MACRO_END * are now "top level" maps (either task map, kernel map or submap * of the kernel map). * - * Since portions of maps are specified by start/end addreses, + * Since portions of maps are specified by start/end addresses, * which may not align with existing map entries, all * routines merely "clip" entries to these start/end values. * [That is, an entry is split into two, bordering at a @@ -122,6 +122,19 @@ zone_t vm_map_copy_zone; /* zone for vm boolean_t vm_map_lookup_entry(); /* forward declaration */ + +/* Deallocates the given address range from the target map. */ + +static kern_return_t vm_map_delete (register vm_map_t map, + register vm_offset_t start, + register vm_offset_t end); + +/* Version of vm_map_copyout() for page list vm map copies. */ + +static kern_return_t vm_map_copyout_page_list (register vm_map_t dst_map, + vm_offset_t *dst_addr /* OUT */, + register vm_map_copy_t copy); + /* * Placeholder object for submap operations. This object is dropped * into the range by a call to vm_map_find, and removed when @@ -1641,10 +1654,9 @@ void vm_map_entry_delete(map, entry) * map. */ -kern_return_t vm_map_delete(map, start, end) - register vm_map_t map; - register vm_offset_t start; - register vm_offset_t end; +static kern_return_t +vm_map_delete (register vm_map_t map, register vm_offset_t start, + register vm_offset_t end) { vm_map_entry_t entry; vm_map_entry_t first_entry; @@ -2713,12 +2725,10 @@ kern_return_t vm_map_copyout(dst_map, ds * Version of vm_map_copyout() for page list vm map copies. * */ -kern_return_t vm_map_copyout_page_list(dst_map, dst_addr, copy) - register - vm_map_t dst_map; - vm_offset_t *dst_addr; /* OUT */ - register - vm_map_copy_t copy; +static kern_return_t +vm_map_copyout_page_list (register vm_map_t dst_map, + vm_offset_t *dst_addr /* OUT */, + register vm_map_copy_t copy) { vm_size_t size; vm_offset_t start; @@ -4445,19 +4455,24 @@ kern_return_t vm_map_lookup(var_map, vad prot = entry->protection; if ((fault_type & (prot)) != fault_type) - if ((prot & VM_PROT_NOTIFY) && (fault_type & VM_PROT_WRITE)) { - RETURN(KERN_WRITE_PROTECTION_FAILURE); - } else { - RETURN(KERN_PROTECTION_FAILURE); - } + { + if ((prot & VM_PROT_NOTIFY) && (fault_type & VM_PROT_WRITE)) + { + RETURN (KERN_WRITE_PROTECTION_FAILURE); + } + else + { + RETURN (KERN_PROTECTION_FAILURE); + } + } /* * If this page is not pageable, we have to get * it for all possible accesses. */ - if (*wired = (entry->wired_count != 0)) - prot = fault_type = entry->protection; + if ((*wired = (entry->wired_count != 0))) + prot = fault_type = entry->protection; /* * If the entry was copy-on-write, we either ... _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd