From a7f248bf76dc0cabd1581143e9f4aa6454c91655 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 18 May 2016 02:25:28 +0200 Subject: Fix gcc-6 warnings * ddb/db_elf.c (elf_db_sym_init): Turn `i' into unsigned. * device/ds_routines.c (ds_device_open, device_writev_trap): Likewise. * i386/i386/user_ldt.c (i386_set_ldt): Likewise for `i', `min_selector', and `first_desc'. (i386_get_ldt): Likewise for `ldt_count'. (user_ldt_free): Likewise for `i'. * i386/i386/xen.h (hyp_set_ldt): Turn `count' into unsigned long. * i386/intel/pmap.c (pmap_bootstrap): Turn `i', `j' and 'n' into unsigned. (pmap_clear_bootstrap_pagetable): Likewise for `i' and `j'. * ipc/ipc_kmsg.c (ipc_msg_print): Turn `i' and `numwords' into unsigned. * kern/boot_script.c (boot_script_parse_line): Likewise for `i'. * kern/bootstrap.c (bootstrap_create): Likewise for `n' and `i'. * kern/host.c (host_processors): Likewise for `i'. * kern/ipc_tt.c (mach_ports_register): Likewise. * kern/mach_clock.c (tickadj, bigadj): turn into unsigned. * kern/processor.c (processor_set_things): Turn `i' into unsigned. * kern/task.c (task_threads): Likewise. * kern/thread.c (consider_thread_collect, stack_init): Likewise. * kern/strings.c (memset): Turn `i' into size_t. * vm/memory_object.c (memory_object_lock_request): Turn `i' into unsigned. * xen/block.c (hyp_block_init): Use %u format for evt. (device_open): Drop unused err variable. (device_write): Turn `copy_npages', `i', `nbpages', and `j' into unsigned. * xen/console.c (hypcnread, hypcnwrite, hypcnclose): Turn dev to dev_t. (hypcnclose): Return void. * xen/console.h (hypcnread, hypcnwrite, hypcnclose): Fix prototypes accordingly. * xen/evt.c (form_int_mask): Turn `i' into int. * xen/net.c (hyp_net_init): Use %u format for evt. (device_open): Remove unused `err' variable. --- kern/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/thread.c') diff --git a/kern/thread.c b/kern/thread.c index ce44ed14..a8211491 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -2332,7 +2332,7 @@ void consider_thread_collect(void) vm_size_t stack_usage( vm_offset_t stack) { - int i; + unsigned i; for (i = 0; i < KERNEL_STACK_SIZE/sizeof(unsigned int); i++) if (((unsigned int *)stack)[i] != STACK_MARKER) @@ -2350,7 +2350,7 @@ void stack_init( vm_offset_t stack) { if (stack_check_usage) { - int i; + unsigned i; for (i = 0; i < KERNEL_STACK_SIZE/sizeof(unsigned int); i++) ((unsigned int *)stack)[i] = STACK_MARKER; -- cgit v1.2.3