Age | Commit message (Collapse) | Author |
|
Variable pager is already of ipc_port_t type.
* device/dev_pager.c: Remove unnecessary casts.
|
|
Avoid the casts by passing the address of the links thread
structure member to enqueue_tail().
* kern/sched_prim.c: Avoid casts.
|
|
|
|
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.
|
|
* 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.
|
|
Initialize lhs to zero to avoid uninitialized usage in db_unary().
* ddb/db_expr.c (db_mult_expr) (lhs): Initialize to zero.
|
|
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.
|
|
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.
|
|
Members offset and phys_addr are of vm_offset_t types.
* vm/vm_resident.c (vm_page_print) (offset, phys_addr): Remove unnecessary casts.
|
|
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 (syscall): Remove forward declaration.
Include locore.h.
* i386/i386/locore.h (syscall): Add prototype.
|
|
This is mach_clock.c, not clock_prim.c.
* kern/mach_clock.c: Update comment.
|
|
|
|
* i386/i386at/kd_mouse.c (kd_mouse_open) (kdintr): Remove forward declaration.
|
|
* i386/i386at/kd.c (kdinit) (kd_xga_init): Remove forward declaration.
* i386/i386at/kd.h (kd_xga_init): Add prototype.
|
|
Variable off is already an unsigned int.
* i386/i386at/kd.c (kdmmap) (off): Remove unnecessary cast.
|
|
* 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.
|
|
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/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.
|
|
Member ip_kobject is of type vm_offset_t.
* ipc/mach_debug.c (mach_port_kernel_object) (ip_kobject): Remove unnecessary cast.
|
|
Return value from ip_kotype is an unsigned int.
* ipc/mach_debug.c (mach_port_kernel_object) (ip_kotype): Remove unnecessary cast.
|
|
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.
|
|
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 (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 (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.
|
|
* 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.
|
|
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.
|
|
(char *)
* device/dev_pager.c (device_pager_data_request) (vm_object_page_map) (ds): Cast to (void *) instead to (char *).
|
|
* 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 (romgetc, romputc): Fix argument list.
|
|
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.
|
|
This is more in line with the call to kalloc() in cb_alloc().
* device/chario.c (tty_inq_size, tty_outq_size): Use unsigned int instead if an int.
* device/cirbuf.c (cb_alloc) (buf_size): Use vm_size_t instead of an int.
* device/cirbuf.h (cb_alloc) (buf_size): Likewise.
|
|
* device/chario.c: Trivial stylistic fix for consistency.
|
|
This is more in line with how the function db_user_to_kernel_address() is
called. In this way there is one cast less and several GCC warnings are
silenced.
* i386/i386/db_interface.c (db_set_hw_watchpoint) (kern_addr): Use vm_offset_t instead of an unsigned int.
(db_user_to_kernel_address) (kaddr): Likewise.
(db_user_to_kernel_address) (ptetokv): Don't cast return value.
(db_read_bytes) (kern_addr): Use vm_offset_t instead of an unsigned int.
(db_write_bytes_user_space) (kern_addr): Likewise.
(db_task_name) (vaddr, kaddr): Likewise.
* i386/i386/db_interface.h (db_user_to_kernel_address) (kaddr): Likewise.
|
|
* i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Cast first arguments to (unsigned int *).
|
|
This fixes the implicit declarations in kern/machine.c and kern/debug.c.
* i386/i386/model_dep.h (halt_cpu, halt_all_cpus): Add prototypes.
* i386/i386at/model_dep.h (halt_cpu, halt_all_cpus): Remove prototypes.
|
|
* ddb/db_break.h (db_check_breakpoint_valid): Add prototype.
* ddb/db_trap.c (db_init_default_thread, db_check_breakpoint_valid): Remove forward declarations.
|
|
In this way everything falls into place and there is one cast less.
Function db_task_printsym() is already always called with the cast to
db_addr_t in the first argument.
* ddb/db_aout.c (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t.
(aout_db_search_by_addr): Don't cast to vm_offset_t. Argument is already
db_addr_t.
* ddb/db_aout.h (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t.
* ddb/db_sym.c (db_task_printsym): Likewise.
(db_line_at_pc): Likewise.
* ddb/db_sym.h (db_task_printsym): Likewise.
(db_line_at_pc): Likewise.
* i386/i386/db_trace.c (db_task_printsym): Cast to db_addr_t instead of db_expr_t.
Member swap_func is a pointer to void.
|
|
Variable db_maxoff is in other files declared as unsigned long.
* ddb/db_print.c (db_maxoff): Use unsigned long instead of an unsigned int.
|
|
Function db_console() is called only if CONSOLE_ON_MASTER.
If it stays this way, db_console() will not compile. I don't know
if it should be removed. Maybe someone will rewrite it.
* ddb/db_mp.c (db_console): Definition only if CONSOLE_ON_MASTER.
* ddb/db_mp.h [CONSOLE_ON_MASTER] (db_console): Add prototype.
|
|
* ddb/db_mp.c (db_enter_debug): Use boolean instead of an int.
|
|
* ddb/db_examine.c: Trivial stylistic fix for consistency.
|
|
* ddb/db_examine.c (db_option): Remove forward declaration.
|
|
* ddb/db_command.c (db_fncall): Remove forward declaration.
|
|
* ddb/db_command.c (db_cmd_loop_done): Use boolean values.
|
|
Struct uio is nowhere defined and in device/buf.h the string uio is defined
as io_req. Remove all declarations of uio structure and use io_req_t instead
of it.
* device/buf.h (uio, io_req): Remove definition.
* i386/i386at/kd.c: Remove comment.
(kdread): Use io_req_t.
(kdwrite): Likewise.
* i386/i386at/kd.h (kdread, kdwrite): Use io_req_t as argument type.
|
|
Variable addr is already of type db_addr_t.
* ddb/db_break.c (db_find_thread_breakpoint_here) (addr): Don't cast to db_addr_t.
|
|
* ddb/db_break.c (db_add_thread_breakpoint): Fix argument list.
|
|
* ddb/db_aout.c (db_sym_parse_and_lookup): Remove forward declaration.
* ddb/db_sym.h (db_sym_parse_and_lookup): Add prototype.
|
|
Function aout_db_qualified_search() returns db_sym_t. Use DB_SYM_NULL as
return value instead of zero.
* ddb/db_aout.c (aout_db_qualified_search): Use DB_SYM_NULL as return value.
|