diff --git a/src/system/kernel/debug/user_debugger.cpp b/src/system/kernel/debug/user_debugger.cpp index 7be3fa6092..4b2102cb88 100644 --- a/src/system/kernel/debug/user_debugger.cpp +++ b/src/system/kernel/debug/user_debugger.cpp @@ -75,7 +75,7 @@ debugger_write(port_id port, int32 code, const void *buffer, size_t bufferSize, // get the write lock TRACE(("debugger_write(): acquiring write lock...\n")); error = acquire_sem_etc(writeLock, 1, - (dontWait ? B_RELATIVE_TIMEOUT : B_KILL_CAN_INTERRUPT), 0); + dontWait ? (uint32)B_RELATIVE_TIMEOUT : (uint32)B_KILL_CAN_INTERRUPT, 0); if (error != B_OK) { TRACE(("debugger_write() done1: %lx\n", error)); return error; @@ -96,7 +96,7 @@ debugger_write(port_id port, int32 code, const void *buffer, size_t bufferSize, TRACE(("debugger_write(): writing to port...\n")); error = write_port_etc(port, code, buffer, bufferSize, - (dontWait ? B_RELATIVE_TIMEOUT : B_KILL_CAN_INTERRUPT), 0); + dontWait ? (uint32)B_RELATIVE_TIMEOUT : (uint32)B_KILL_CAN_INTERRUPT, 0); } // release the write lock diff --git a/src/system/kernel/elf.c b/src/system/kernel/elf.c index 1e43a44ca1..a79f39d712 100644 --- a/src/system/kernel/elf.c +++ b/src/system/kernel/elf.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2002-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. * * Copyright 2001, Travis Geiselbrecht. All rights reserved. @@ -212,14 +212,14 @@ create_image_struct() static uint32 -elf_hash(const unsigned char *name) +elf_hash(const char *name) { - unsigned long hash = 0; - unsigned long temp; + uint32 hash = 0; + uint32 temp; while (*name) { - hash = (hash << 4) + *name++; - if((temp = hash & 0xf0000000)) + hash = (hash << 4) + (uint8)*name++; + if ((temp = hash & 0xf0000000) != 0) hash ^= temp >> 24; hash &= ~temp; } diff --git a/src/system/kernel/lib/kernel_vsprintf.c b/src/system/kernel/lib/kernel_vsprintf.c index a0d803b40e..732bbc6d99 100644 --- a/src/system/kernel/lib/kernel_vsprintf.c +++ b/src/system/kernel/lib/kernel_vsprintf.c @@ -1,5 +1,5 @@ /* - * Copyright 2003-2005, Axel Dörfler. All rights reserved. + * Copyright 2003-2006, Axel Dörfler. All rights reserved. * Distributed under the terms of the MIT license. * * Copyright 2001, Travis Geiselbrecht. All rights reserved. @@ -169,7 +169,7 @@ number(char **_string, int32 *_bytesLeft, int64 num, uint32 base, int size, if (num == 0) tmp[i++] = '0'; else while (num != 0) - tmp[i++] = digits[do_div(&num, base)]; + tmp[i++] = digits[do_div((uint64 *)&num, base)]; if (i > precision) precision = i; diff --git a/src/system/kernel/module.c b/src/system/kernel/module.c index 1bf02052e9..53ee717ac7 100644 --- a/src/system/kernel/module.c +++ b/src/system/kernel/module.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005, Haiku Inc. All rights reserved. + * Copyright 2002-2006, Haiku Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Copyright 2001, Thomas Kurschel. All rights reserved. @@ -127,7 +127,7 @@ typedef struct module_iterator { module_image *module_image; module_info **current_header; const char *current_path; - int32 path_base_length; + uint32 path_base_length; const char *current_module_path; bool builtin_modules; } module_iterator;