Commit a63749cc authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

ntdll: Sign-compare warnings fix.

parent 3aae9546
......@@ -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
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -1511,8 +1511,7 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString(
const UNICODE_STRING *search_chars, /* [I] Unicode string which contains the characters to search for */
USHORT *pos) /* [O] Position of the first character found + 2 */
{
int main_idx;
unsigned int search_idx;
unsigned int main_idx, search_idx;
switch (flags) {
case 0:
......@@ -1527,7 +1526,8 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString(
*pos = 0;
return STATUS_NOT_FOUND;
case 1:
for (main_idx = main_str->Length / sizeof(WCHAR) - 1; main_idx >= 0; main_idx--) {
main_idx = main_str->Length / sizeof(WCHAR);
while (main_idx-- > 0) {
for (search_idx = 0; search_idx < search_chars->Length / sizeof(WCHAR); search_idx++) {
if (main_str->Buffer[main_idx] == search_chars->Buffer[search_idx]) {
*pos = main_idx * sizeof(WCHAR);
......@@ -1552,7 +1552,8 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString(
*pos = 0;
return STATUS_NOT_FOUND;
case 3:
for (main_idx = main_str->Length / sizeof(WCHAR) - 1; main_idx >= 0; main_idx--) {
main_idx = main_str->Length / sizeof(WCHAR);
while (main_idx-- > 0) {
search_idx = 0;
while (search_idx < search_chars->Length / sizeof(WCHAR) &&
main_str->Buffer[main_idx] != search_chars->Buffer[search_idx]) {
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment