Commit e5b5af9d authored by Jörg Mayer's avatar Jörg Mayer Committed by Alexandre Julliard

Fixed a few signed/unsigned and "unsigned < 0 always true" warnings.

parent 061cfa80
......@@ -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;
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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 )
......
......@@ -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;
......
......@@ -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);
......
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