diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 377ef22b071..6226e7d180c 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -1440,7 +1440,7 @@ COMBOEX_WM_DeleteItem (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACE("CtlType=%08x, CtlID=%08x, itemID=%08x, hwnd=%x, data=%08lx\n", dis->CtlType, dis->CtlID, dis->itemID, dis->hwndItem, dis->itemData); - if ((dis->itemID >= infoPtr->nb_items) || (dis->itemID < 0)) return FALSE; + if (dis->itemID >= infoPtr->nb_items) return FALSE; olditem = infoPtr->items; i = infoPtr->nb_items - 1; diff --git a/dlls/ddraw/helper.c b/dlls/ddraw/helper.c index bfce85bd9b8..79eb52a3416 100644 --- a/dlls/ddraw/helper.c +++ b/dlls/ddraw/helper.c @@ -45,7 +45,7 @@ typedef struct static void DDRAW_dump_flags(DWORD flags, const flag_info* names, size_t num_names) { - int i; + unsigned int i; for (i=0; i < num_names; i++) if (names[i].val & flags) @@ -57,9 +57,9 @@ static void DDRAW_dump_flags(DWORD flags, const flag_info* names, static void DDRAW_dump_members(DWORD flags, const void* data, const member_info* mems, size_t num_mems) { - int i; + unsigned int i; - for (i=0; i < sizeof(mems)/sizeof(mems[0]); i++) + for (i=0; i < num_mems; i++) { if (mems[i].val & flags) { diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index f25b532bdc8..54af18841e8 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -399,7 +399,7 @@ static ICOM_VTABLE(IClassFactory) DDCF_Vtbl = */ DWORD WINAPI DDRAW_DllGetClassObject(REFCLSID rclsid,REFIID riid,LPVOID *ppv) { - int i; + unsigned int i; IClassFactoryImpl *factory; TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 4c3c83c4ed3..57a7bd4cb22 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -33,7 +33,7 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle, DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0; NTSTATUS ret; - if ((MaximumCount <= 0) || (InitialCount < 0) || (InitialCount > MaximumCount)) + if ((MaximumCount <= 0) || (InitialCount > MaximumCount)) return STATUS_INVALID_PARAMETER; SERVER_START_VAR_REQ( create_semaphore, len ) diff --git a/graphics/dispdib.c b/graphics/dispdib.c index 18afb4d5fda..e6e3f9ad3e6 100644 --- a/graphics/dispdib.c +++ b/graphics/dispdib.c @@ -56,7 +56,8 @@ static void DISPDIB_Palette(LPBITMAPINFO lpbi) static void DISPDIB_Show(LPBITMAPINFOHEADER lpbi,LPSTR lpBits,WORD uFlags) { int Xofs,Yofs,Width=lpbi->biWidth,Height=lpbi->biHeight,Delta; - unsigned Pitch=(Width+3)&~3,sPitch,sWidth,sHeight; + int Pitch = (Width + 3) & ~3; + unsigned int sPitch,sWidth,sHeight; LPSTR surf = DOSMEM_MapDosToLinear(0xa0000); if (VGA_GetMode(&sHeight,&sWidth,NULL)) return; diff --git a/loader/ne/resource.c b/loader/ne/resource.c index 7dbe398c7cd..710b06309de 100644 --- a/loader/ne/resource.c +++ b/loader/ne/resource.c @@ -207,7 +207,7 @@ HGLOBAL16 WINAPI NE_DefResourceHandler( HGLOBAL16 hMemObj, HMODULE16 hModule, } return handle; } - if (pModule && (fd = NE_OpenFile( pModule )) >= 0) + if (pModule && (fd = NE_OpenFile( pModule )) != INVALID_HANDLE_VALUE) { HGLOBAL16 handle; WORD sizeShift = *(WORD *)((char *)pModule + pModule->res_table);