ntdll: Sign-compare warnings fix (1 of 2)
Andrew Talbot
andrew.talbot at talbotville.com
Thu Oct 23 16:24:04 CDT 2008
Changelog:
ntdll: Sign-compare warnings fix.
diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index f6fed81..998b2dc 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -1370,7 +1370,7 @@ static NTSTATUS CDROM_RawRead(int fd, const RAW_READ_INFO* raw, void* buffer, DW
DWORD lba = raw->DiskOffset.QuadPart >> 11;
struct cdrom_msf* msf;
PBYTE *bp; /* current buffer pointer */
- int i;
+ DWORD i;
if ((lba + raw->SectorCount) >
((1 << 8*sizeof(msf->cdmsf_min0)) * CD_SECS * CD_FRAMES
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 44b88b2..cd3fdd7 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -256,7 +256,7 @@ static RTL_CRITICAL_SECTION_DEBUG process_heap_critsect_debug =
*/
static void HEAP_Dump( HEAP *heap )
{
- int i;
+ unsigned int i;
SUBHEAP *subheap;
char *ptr;
@@ -620,7 +620,7 @@ static SUBHEAP *HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
{
SUBHEAP *subheap;
FREE_LIST_ENTRY *pEntry;
- int i;
+ unsigned int i;
/* Commit memory */
@@ -819,7 +819,7 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
*/
static BOOL HEAP_IsValidArenaPtr( const HEAP *heap, const ARENA_FREE *ptr )
{
- int i;
+ unsigned int i;
const SUBHEAP *subheap = HEAP_FindSubHeap( heap, ptr );
if (!subheap) return FALSE;
if ((const char *)ptr >= (const char *)subheap->base + subheap->headerSize) return TRUE;
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 425ddf8..af0f200 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -899,7 +899,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
NTSTATUS status = STATUS_SUCCESS;
ULONG len;
LPWSTR String;
- INT count = 0;
+ ULONG count = 0;
if (pInfo == NULL)
{
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 9411db1..47e0196 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -274,8 +274,8 @@ HANDLE thread_init(void)
/* allocate and initialize the initial TEB */
sigstack_total_size = get_signal_stack_total_size();
- while (1 << sigstack_zero_bits < sigstack_total_size) sigstack_zero_bits++;
- assert( 1 << sigstack_zero_bits == sigstack_total_size ); /* must be a power of 2 */
+ while (1U << sigstack_zero_bits < sigstack_total_size) sigstack_zero_bits++;
+ assert( 1U << sigstack_zero_bits == sigstack_total_size ); /* must be a power of 2 */
assert( sigstack_total_size >= sizeof(TEB) + sizeof(struct startup_info) );
thread_info.teb_size = sigstack_total_size;
More information about the wine-patches
mailing list