aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Mark pure functions with attribute pureMarin Ramesa2013-12-2012-18/+18
|
* kern/strings.c (strlen): mark with attribute pureMarin Ramesa2013-12-201-1/+1
| | | | * kern/strings.c (strlen): Mark with attribute pure.
* ddb/db_watch.c (db_watchpoint_cmd): remove forward declarationMarin Ramesa2013-12-201-1/+0
| | | | * ddb/db_watch.c (db_watchpoint_cmd) (db_option): Remove forward declaration.
* Declare void argument lists (part 2)Marin Ramesa2013-12-2013-19/+19
| | | | | | | | Declare void argument lists that were not declared in the first part of this patch and * kern/sched_prim.h (recompute_priorities): Fix prototype. * kern/startup.c (setup_main) (recompute_priorities): Fix call.
* kern: avoid the casts in enqueue_head() and enqueue_tail()Marin Ramesa2013-12-173-3/+3
| | | | | | * kern/eventcount.c (simpler_thread_setrun) (enqueue_head) (th): Avoid the cast. * kern/thread.c (thread_halt_self) (enqueue_tail) (thread): Likewise. * kern/thread_swap.c (thread_swapin) (enqueue_tail) (thread): Likewise.
* Mark functions that don't return with attribute noreturnMarin Ramesa2013-12-1714-19/+19
|
* vm: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-179-21/+21
|
* util: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-172-5/+5
|
* kern: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-1716-54/+55
|
* ipc: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-177-14/+14
|
* i386: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-1721-48/+48
|
* device: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-1712-93/+93
|
* Cleanup of the copyin() and copyout() callsMarin Ramesa2013-12-174-18/+18
| | | | | | | | | | | | | * device/ds_routines.c (device_write_trap) (copyin) (data): Cast to (void *). Argument is an address. (device_write_trap) (copyin) (io_data): Don't cast. (device_writev_trap) (copyin) (iovec, stack_iovec): Likewise. (device_writev_trap) (copyin) (data, p): Cast to (void *). Arguments are addresses. * kern/bootstrap.c (build_args_and_stack) (copyout) (arg_count, string_pos, zero): Don't cast. * kern/ipc_mig.c (syscall_vm_map) (copyin, copyout) (addr, address): Likewise. (syscall_vm_allocate) (copyin, copyout) (addr, address): Likewise. (syscall_task_create) (copyout) (name, child_task): Likewise. (syscall_mach_port_allocate) (copyout) (name, namep): Likewise. * kern/time_stamp.c (copyout) (temp, tsp): Likewise.
* kern/sched_prim.h: remove unnecessary __GNUC__ #ifdefMarin Ramesa2013-12-171-4/+1
| | | | | | | Attribute noreturn is used irrespective of __GNUC__. Remove unnecessary #ifdef. * kern/sched_prim.h [__GNUC__]: Remove #ifdef.
* xen: add missing includesJustus Winter2013-12-171-0/+2
| | | | * xen/console.h: Add missing includes.
* kern: quiet GCC warnings about set but unused variablesMarin Ramesa2013-12-163-19/+9
| | | | | | | | * kern/lock.h (simple_lock_data_empty): Define. (decl_simple_lock_data, simple_unlock): Likewise. * kern/sched_prim.c (lock): Declare. [MACH_SLOCKS]: Remove #ifs. * kern/task.c (task_lock, task_unlock): Remove address operator.
* Quiet GCC warning about uninitialized variableMarin Ramesa2013-12-162-2/+2
| | | | | * ddb/db_command.h (db_error): Mark with attribute noreturn. * i386/i386/setjmp.h (_longjmp): Likewise.
* i386/i386/db_trace.c: use (long *) instead of an (int *)Marin Ramesa2013-12-151-1/+1
| | | | * i386/i386/db_trace.c (db_lookup_i386_kreg) (kregp): Use (long *) instead of an (int *).
* device/dev_pager.c (device_pager_data_request_done): cast to size_t instead ↵Marin Ramesa2013-12-151-1/+1
| | | | | | to unsigned * device/dev_pager.c (device_pager_data_request_done) (memset) (io_residual): Cast to size_t instead to unsigned.
* device/dev_pager.c: remove unnecessary castsMarin Ramesa2013-12-151-2/+2
| | | | | | Variable pager is already of ipc_port_t type. * device/dev_pager.c: Remove unnecessary casts.
* kern/sched_prim.c: avoid castsMarin Ramesa2013-12-151-3/+3
| | | | | | | Avoid the casts by passing the address of the links thread structure member to enqueue_tail(). * kern/sched_prim.c: Avoid casts.
* ddb: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-1533-145/+146
|
* Fix gcc signedness warningSamuel Thibault2013-12-152-5/+5
| | | | | | | | Thanks Marin Ramesa and Richard Braun for investigating. * i386/i386at/kd.c (kdintr): Make `char_idx' and `max' unsigned. (kdstate2idx): Make function take and return unsigned ints for the state. * i386/i386at/kd.h (kdstate2idx): Likewise.
* Type definitionMarin Ramesa2013-12-1510-24/+24
| | | | | | | | | | | | | | | | * i386/i386/ast_check.c (init_ast_check, cause_ast_check): Define return type. * i386/i386/pic.c (intnull, prtnull): Define argument types. * i386/i386at/com.c (compr_addr): Likewise. (compr): Likewise. (compr_addr): Fix printf format. * i386/i386at/kd.c (kd_cmdreg_write, kd_kbd_magic): Define argument types. * i386/i386at/kd_mouse.c (init_mouse_hw): Likewise. * ipc/mach_port.c (sact_count): Define return type. * ipc/mach_rpc.c (mach_port_rpc_sig): Define argument types. * kern/act.c (dump_act): Define return type. * kern/lock_mon.c (simple_lock, simple_lock_try, simple_unlock, lip, lock_info_sort, lock_info_clear, print_lock_info): Define return type. (time_lock): Define return type and argument type. * kern/timer.c (time_trap_uexit): Define argument type.
* ddb/db_expr.c (db_mult_expr): initialize lhsMarin Ramesa2013-12-151-1/+1
| | | | | | Initialize lhs to zero to avoid uninitialized usage in db_unary(). * ddb/db_expr.c (db_mult_expr) (lhs): Initialize to zero.
* ddb/db_break.c (db_delete_cmd): remove unnecessary initializationMarin Ramesa2013-12-151-1/+1
| | | | | | | | Now that we have returns there are no more warnings from GCC about uninitialized variable. Remove unnecessary initialization of variable bkpt. * ddb/db_break.c (db_delete_cmd) (bkpt): Remove unnecessary initialization.
* ddb/db_break.c (db_find_breakpoint_here): remove unnecessary castsMarin Ramesa2013-12-151-1/+1
| | | | | | | Variable addr and member address are already of db_addr_t type which is type defined as vm_offset_t. * ddb/db_break.c (db_find_breakpoint_here) (DB_PHYS_EQ) (addr, address): Remove unecessary casts.
* vm/vm_resident.c (vm_page_print): remove unnecessary castsMarin Ramesa2013-12-151-2/+2
| | | | | | Members offset and phys_addr are of vm_offset_t types. * vm/vm_resident.c (vm_page_print) (offset, phys_addr): Remove unnecessary casts.
* vm/vm_kern.c (kmem_submap): remove unnecessary castMarin Ramesa2013-12-151-1/+1
| | | | | | The return value from vm_map_min() is already of vm_offset_t type. * vm/vm_kern.c (kmem_submap) (addr): Remove unnecessary cast.
* i386/i386/ldt.c: remove forward declarationMarin Ramesa2013-12-152-2/+3
| | | | | | * i386/i386/ldt.c (syscall): Remove forward declaration. Include locore.h. * i386/i386/locore.h (syscall): Add prototype.
* kern/mach_clock.c: update commentMarin Ramesa2013-12-151-1/+1
| | | | | | This is mach_clock.c, not clock_prim.c. * kern/mach_clock.c: Update comment.
* Declare void argument listsMarin Ramesa2013-12-1551-140/+139
|
* i386/i386at/kd_mouse.c (kd_mouse_open): remove forward declarationMarin Ramesa2013-12-111-1/+0
| | | | * i386/i386at/kd_mouse.c (kd_mouse_open) (kdintr): Remove forward declaration.
* i386/i386at/kd.c (kdinit): remove forward declarationMarin Ramesa2013-12-112-1/+2
| | | | | * i386/i386at/kd.c (kdinit) (kd_xga_init): Remove forward declaration. * i386/i386at/kd.h (kd_xga_init): Add prototype.
* i386/i386at/kd.c (kdmmap): remove unnecessary castMarin Ramesa2013-12-111-1/+1
| | | | | | Variable off is already an unsigned int. * i386/i386at/kd.c (kdmmap) (off): Remove unnecessary cast.
* i386/i386at/kd.c: remove forward declarationsMarin Ramesa2013-12-112-6/+7
| | | | | | * i386/i386at/kd.c (kd_getdata, state2leds, kdstart, kdstop): Remove forward declarations. * i386/i386at/kd.h (kd_getdata, state2leds, kdstart, kdstop): Add prototypes. Include device/tty.h.
* i386/i386/db_trace.c (db_i386_stack_trace): remove unnecessary castMarin Ramesa2013-12-111-4/+4
| | | | | | | Argument to INKERNEL() is already cast to vm_offset_t in the macro itself. * i386/i386/db_trace.c (db_i386_stack_trace) (INKERNEL) (callpc): Don't cast to unsigned long. (db_i386_stack_trace) (INKERNEL) (frame): Likewise.
* i386/i386/db_trace.c: remove forward declarationMarin Ramesa2013-12-113-8/+34
| | | | | | | | | | | * i386/Makefrag.am: List i386/i386/db_trace.h. * i386/i386/db_trace.c: Include machine/db_trace.h. (db_i386_stack_trace): Remove forward declaration. * i386/i386/db_trace.h: New file. Add copyright. [_I386_DB_TRACE_H_]: Add ifndef. (i386_frame): Declare forward. (db_i386_stack_trace): Add prototype.
* ipc/mach_debug.c (mach_port_kernel_object): remove unnecessary castMarin Ramesa2013-12-111-1/+1
| | | | | | Member ip_kobject is of type vm_offset_t. * ipc/mach_debug.c (mach_port_kernel_object) (ip_kobject): Remove unnecessary cast.
* ipc/mach_debug.c (mach_port_kernel_object): remove unnecessary castMarin Ramesa2013-12-111-1/+1
| | | | | | Return value from ip_kotype is an unsigned int. * ipc/mach_debug.c (mach_port_kernel_object) (ip_kotype): Remove unnecessary cast.
* Cleanup of the memcpy(), memmove(), memcmp() and memset() callsMarin Ramesa2013-12-119-13/+13
| | | | | | | | | | | | | | | | | | | | Addresses were cast to (void *). Pointers uncasted. * device/ds_routines.c (ds_read_done) (memset) (start_sent): Cast to (void *) instead to (char *). Argument is an address. (ds_read_done) (memset) (end_data): Likewise. * i386/i386/pcb.c (thread_getstatus) (memcpy) (pm): Don't cast. Argument is a pointer. (thread_getstatus) (memcpy) (iopb): Likewise. * i386/i386at/immc.c (immc_cnputc) (memmove): Cast first argument to (void *). Argument is an address. (immc_cnputc) (memmove): Cast second argument to (void *). Argument is an address. (immc_cnputc) (memset): Cast first argument to (void *). Argument is an address. * i386/i386at/model_dep.c (i386at_init) (memcpy) (phystokv): Cast to (void *) instead to (char *). Argument is an address. * i386/intel/pmap.c (pmap_init) (memset) (addr): Likewise. * ipc/mach_debug.c (mach_port_space_info) (memset) (table_addr + size_used): Likewise. (mach_port_space_info) (memset) (tree_addr + size_used): Likewise. * kern/host.c (host_processor_sets) (memcpy) (newaddr): Likewise. (host_processor_sets) (memcpy) (addr): Likewise. * kern/xpr.c (xprbootstrap) (memset) (addr): Likewise. * vm/vm_debug.c (mach_vm_object_pages) (memset) (addr + size_used): Likewise.
* device/subrs.c: use io_req_t instead of struct bufMarin Ramesa2013-12-101-10/+8
| | | | | | | | | | | Struct buf is not defined. Use io_req_t instead of it. * device/subrs.c (harderr) (bp): Change name to ior and use io_req_t as type instead of (struct buf *). (harderr) (minor): Use io_unit instead of b_dev. (harderr): Use io_recnum instead of b_blkno. (gateblk): Use io_req_t as return value instead of (struct buf *). (brelse) (bp): Change name to ior and use io_req_t as type instead of (struct buf *). (brelse) (ior): Remove variable.
* device/net_io.c: remove forward declarationsMarin Ramesa2013-12-102-38/+58
| | | | | | * device/net_io.c (bpf_hash, net_do_filter, bpf_do_filter, hash_ent_remove, net_free_dead_infp, net_free_dead_entp, bpf_validate, bpf_eq, net_add_q_info, bpf_match): Remove forward declarations. * device/net_io.h (net_rcv_port, net_hash_entry, net_hash_header): Declare forward. (bpf_hash, net_do_filter, bpf_do_filter, hash_ent_remove, net_free_dead_infp, net_free_dead_entp, bpf_validate, bpf_eq, net_add_q_info, bpf_match): Add prototypes.
* device/dev_pager.c: remove forward declarationsMarin Ramesa2013-12-102-4/+4
| | | | | * device/dev_pager.c (device_pager_data_request_done, device_pager_data_write_done): Remove forward declarations. * device/dev_pager.h (device_pager_data_request_done, device_pager_data_write_done): Add prototypes.
* device/dev_pager.c: remove forward declarationMarin Ramesa2013-12-103-3/+26
| | | | | | | | | | * Makefrag.am: Include device/blkio.h. * device/blkio.h: New file. Add copyright. [_DEVICE_BLKIO_H_]: Add ifndef. (block_io_mmap): Add prototype. * device/dev_pager.c: Include device/blkio.h. (block_io_mmap): Remove forward declaration.
* device/dev_pager.c (device_pager_data_request_done): remove unnecessary castMarin Ramesa2013-12-101-1/+1
| | | | | | | The argument to trunc_page() is already cast to vm_offset_t in the macro itself. * device/dev_pager.c (device_pager_data_request_done) (trunc_page) (io_data): Don't cast to vm_offset_t.
* device/dev_pager.c (device_pager_data_request): cast to (void *) instead to ↵Marin Ramesa2013-12-101-1/+1
| | | | | | (char *) * device/dev_pager.c (device_pager_data_request) (vm_object_page_map) (ds): Cast to (void *) instead to (char *).
* device/dev_pager.c (device_pager_data_request): remove forward declarationMarin Ramesa2013-12-103-1/+26
| | | | | | | | | | * Makefrag.am: Include device/dev_pager.h. * device/dev_pager.c: Likewise. (device_map_page): Remove forward declaration. * device/dev_pager.h: New file. Add copyright. [_DEVICE_DEV_PAGER_H_]: Add ifndef. (device_map_page): Add prototype.
* device/cons.c: fix argument listMarin Ramesa2013-12-101-2/+2
| | | | * device/cons.c (romgetc, romputc): Fix argument list.
* device/cirbuf.c (cb_free): use vm_size_t instead of an intMarin Ramesa2013-12-101-1/+1
| | | | | | This is more in line with the call to kfree() in cb_free(). * device/cirbuf.c (cb_free) (size): Use vm_size_t instead of an int.