diff --git a/dlls/gdi/gdiobj.c b/dlls/gdi/gdiobj.c index 57ac1385986..b663839516e 100644 --- a/dlls/gdi/gdiobj.c +++ b/dlls/gdi/gdiobj.c @@ -1357,7 +1357,7 @@ DWORD WINAPI GdiSetBatchLimit( DWORD limit ) DWORD WINAPI GdiSeeGdiDo16( WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3 ) { - DWORD ret = ~0UL; + DWORD ret = ~0U; switch (wReqType) { diff --git a/dlls/kernel/local16.c b/dlls/kernel/local16.c index 4831fe57169..8499d645c2f 100644 --- a/dlls/kernel/local16.c +++ b/dlls/kernel/local16.c @@ -1768,8 +1768,8 @@ HANDLE WINAPI Local32Init16( WORD segment, DWORD tableSize, segSize++; } - if ( heapSize == -1L ) - heapSize = 1024L*1024L; /* FIXME */ + if ( heapSize == (DWORD)-1 ) + heapSize = 1024*1024; /* FIXME */ heapSize = (heapSize + 0xffff) & 0xffff0000; segSize = (segSize + 0x0fff) & 0xfffff000; diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c index 101c6cce907..fe2fa5d87cd 100644 --- a/dlls/kernel/process.c +++ b/dlls/kernel/process.c @@ -2136,18 +2136,18 @@ DWORD WINAPI TlsAlloc( void ) RtlAcquirePebLock(); index = RtlFindClearBitsAndSet( peb->TlsBitmap, 1, 0 ); - if (index != ~0UL) NtCurrentTeb()->TlsSlots[index] = 0; /* clear the value */ + if (index != ~0U) NtCurrentTeb()->TlsSlots[index] = 0; /* clear the value */ else { index = RtlFindClearBitsAndSet( peb->TlsExpansionBitmap, 1, 0 ); - if (index != ~0UL) + if (index != ~0U) { if (!NtCurrentTeb()->TlsExpansionSlots && !(NtCurrentTeb()->TlsExpansionSlots = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 8 * sizeof(peb->TlsExpansionBitmapBits) * sizeof(void*) ))) { RtlClearBits( peb->TlsExpansionBitmap, index, 1 ); - index = ~0UL; + index = ~0U; SetLastError( ERROR_NOT_ENOUGH_MEMORY ); } else diff --git a/dlls/kernel/tests/mailslot.c b/dlls/kernel/tests/mailslot.c index b5f99ad7188..d03c867a097 100644 --- a/dlls/kernel/tests/mailslot.c +++ b/dlls/kernel/tests/mailslot.c @@ -65,10 +65,10 @@ static int mailslot_test(void) dwMax = dwNext = dwMsgCount = dwTimeout = 0; ok( GetMailslotInfo( hSlot, &dwMax, &dwNext, &dwMsgCount, &dwTimeout ), "getmailslotinfo failed\n"); - ok( dwMax == ~0UL, "dwMax incorrect\n"); + ok( dwMax == ~0U, "dwMax incorrect\n"); ok( dwNext == MAILSLOT_NO_MESSAGE, "dwNext incorrect\n"); ok( dwMsgCount == 0, "dwMsgCount incorrect\n"); - ok( dwTimeout == ~0UL, "dwTimeout incorrect\n"); + ok( dwTimeout == ~0U, "dwTimeout incorrect\n"); ok( GetMailslotInfo( hSlot, NULL, NULL, NULL, NULL ), "getmailslotinfo failed\n"); ok( CloseHandle(hSlot), "failed to close mailslot\n"); diff --git a/dlls/kernel/tests/thread.c b/dlls/kernel/tests/thread.c index f9fb3af568e..bd186ee3309 100644 --- a/dlls/kernel/tests/thread.c +++ b/dlls/kernel/tests/thread.c @@ -290,8 +290,8 @@ static VOID test_SuspendThread(void) 0,threadId); ok(access_thread!=NULL,"OpenThread returned an invalid handle\n"); if (access_thread!=NULL) { - obey_ar(SuspendThread(access_thread)==~0UL); - obey_ar(ResumeThread(access_thread)==~0UL); + obey_ar(SuspendThread(access_thread)==~0U); + obey_ar(ResumeThread(access_thread)==~0U); ok(CloseHandle(access_thread)!=0,"CloseHandle Failed\n"); } } @@ -307,7 +307,7 @@ static VOID test_SuspendThread(void) } /* Trying to suspend a terminated thread should fail */ error=SuspendThread(thread); - ok(error==~0UL, "wrong return code: %ld\n", error); + ok(error==~0U, "wrong return code: %ld\n", error); ok(GetLastError()==ERROR_ACCESS_DENIED || GetLastError()==ERROR_NO_MORE_ITEMS, "unexpected error code: %ld\n", GetLastError()); ok(CloseHandle(thread)!=0,"CloseHandle Failed\n"); diff --git a/dlls/ntdll/rtlbitmap.c b/dlls/ntdll/rtlbitmap.c index 8cecad230db..b7ef0041d35 100644 --- a/dlls/ntdll/rtlbitmap.c +++ b/dlls/ntdll/rtlbitmap.c @@ -397,7 +397,7 @@ ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP lpBits, ULONG ulCount, ULONG ulHint) TRACE("(%p,%ld,%ld)\n", lpBits, ulCount, ulHint); if (!lpBits || !ulCount || ulCount > lpBits->SizeOfBitMap) - return ~0UL; + return ~0U; ulEnd = lpBits->SizeOfBitMap; @@ -421,7 +421,7 @@ ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP lpBits, ULONG ulCount, ULONG ulHint) else ulPos++; } - return ~0UL; + return ~0U; } /************************************************************************* @@ -444,7 +444,7 @@ ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP lpBits, ULONG ulCount, ULONG ulHint) TRACE("(%p,%ld,%ld)\n", lpBits, ulCount, ulHint); if (!lpBits || !ulCount || ulCount > lpBits->SizeOfBitMap) - return ~0UL; + return ~0U; ulEnd = lpBits->SizeOfBitMap; @@ -468,7 +468,7 @@ ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP lpBits, ULONG ulCount, ULONG ulHint) else ulPos++; } - return ~0UL; + return ~0U; } /************************************************************************* @@ -491,7 +491,7 @@ ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP lpBits, ULONG ulCount, ULONG ulH TRACE("(%p,%ld,%ld)\n", lpBits, ulCount, ulHint); ulPos = RtlFindSetBits(lpBits, ulCount, ulHint); - if (ulPos != ~0UL) + if (ulPos != ~0U) RtlClearBits(lpBits, ulPos, ulCount); return ulPos; } @@ -516,7 +516,7 @@ ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP lpBits, ULONG ulCount, ULONG ulH TRACE("(%p,%ld,%ld)\n", lpBits, ulCount, ulHint); ulPos = RtlFindClearBits(lpBits, ulCount, ulHint); - if (ulPos != ~0UL) + if (ulPos != ~0U) RtlSetBits(lpBits, ulPos, ulCount); return ulPos; } @@ -724,7 +724,7 @@ static ULONG NTDLL_FindSetRun(PCRTL_BITMAP lpBits, ULONG ulStart, PULONG lpSize) ulStart = (ulStart & ~7u) + 8; lpOut++; if (ulStart >= lpBits->SizeOfBitMap) - return ~0UL; + return ~0U; } /* Count blocks of 8 set bits */ @@ -815,7 +815,7 @@ static ULONG NTDLL_FindClearRun(PCRTL_BITMAP lpBits, ULONG ulStart, PULONG lpSiz ulStart = (ulStart & ~7u) + 8; lpOut++; if (ulStart >= lpBits->SizeOfBitMap) - return ~0UL; + return ~0U; } /* Count blocks of 8 clear bits */ @@ -958,14 +958,14 @@ static ULONG WINAPI NTDLL_FindRuns(PCRTL_BITMAP lpBits, PRTL_BITMAP_RUN lpSeries TRACE("(%p,%p,%ld,%d)\n", lpBits, lpSeries, ulCount, bLongest); if (!ulCount) - return ~0UL; + return ~0U; while (ulPos < lpBits->SizeOfBitMap) { /* Find next set/clear run */ ULONG ulSize, ulNextPos = fn(lpBits, ulPos, &ulSize); - if (ulNextPos == ~0UL) + if (ulNextPos == ~0U) break; if (bLongest && ulRuns == ulCount) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index fa1fd77558d..1786173917e 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1205,7 +1205,7 @@ static void test_VarNumFromParseNum(void) /* 0x80000002 */ SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 2); - CONVERT(8,0,0,8,4,0, INTEGER_VTBITS); EXPECT_I4(0x80000002L); + CONVERT(8,0,0,8,4,0, INTEGER_VTBITS); EXPECT_I4(0x80000002); /* 0x8000000000000002 (64 bits) */ SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 0); @@ -1232,7 +1232,7 @@ static void test_VarNumFromParseNum(void) /* 0x80000002 */ SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 2); - CONVERT(8,0,0,8,4,0, VTBIT_I4); EXPECT_I4(0x80000002L); + CONVERT(8,0,0,8,4,0, VTBIT_I4); EXPECT_I4(0x80000002); /* 0x8000000000000002 (64 bits) */ SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 0); diff --git a/dlls/shlwapi/clist.c b/dlls/shlwapi/clist.c index c5312de2348..b39c247d4fd 100644 --- a/dlls/shlwapi/clist.c +++ b/dlls/shlwapi/clist.c @@ -40,7 +40,7 @@ typedef struct tagSHLWAPI_CLIST typedef const SHLWAPI_CLIST* LPCSHLWAPI_CLIST; /* ulId for contained SHLWAPI_CLIST items */ -#define CLIST_ID_CONTAINER (~0UL) +#define CLIST_ID_CONTAINER (~0U) HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); diff --git a/dlls/shlwapi/tests/clist.c b/dlls/shlwapi/tests/clist.c index 6abe85a9efa..f909a8c47dd 100644 --- a/dlls/shlwapi/tests/clist.c +++ b/dlls/shlwapi/tests/clist.c @@ -299,13 +299,13 @@ static void test_CList(void) inserted = pSHLWAPI_22(list, item->ulId); ok(inserted != NULL, "lost after adding\n"); - ok(!inserted || inserted->ulId != ~0UL, "find returned a container\n"); + ok(!inserted || inserted->ulId != ~0U, "find returned a container\n"); /* Check size */ if (inserted && inserted->ulSize & 0x3) { /* Contained */ - ok(inserted[-1].ulId == ~0UL, "invalid size is not countained\n"); + ok(inserted[-1].ulId == ~0U, "invalid size is not countained\n"); ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST), "container too small\n"); } @@ -378,7 +378,7 @@ static void test_CList(void) inserted = (LPSHLWAPI_CLIST)buff; inserted->ulSize = 44; - inserted->ulId = ~0UL; + inserted->ulId = ~0U; hRet = pSHLWAPI_20(&list, inserted); /* See comment above, some early versions fail this call */ #if 0 @@ -424,13 +424,13 @@ static void test_CList(void) inserted = pSHLWAPI_22(list, item->ulId); ok(inserted != NULL, "lost after adding\n"); - ok(!inserted || inserted->ulId != ~0UL, "find returned a container\n"); + ok(!inserted || inserted->ulId != ~0U, "find returned a container\n"); /* Check size */ if (inserted && inserted->ulSize & 0x3) { /* Contained */ - ok(inserted[-1].ulId == ~0UL, "invalid size is not countained\n"); + ok(inserted[-1].ulId == ~0U, "invalid size is not countained\n"); ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST), "container too small\n"); } diff --git a/dlls/version/install.c b/dlls/version/install.c index 4343c674d78..8bd73586233 100644 --- a/dlls/version/install.c +++ b/dlls/version/install.c @@ -416,7 +416,7 @@ DWORD WINAPI VerInstallFileA( } ret = LZCopy(hfsrc,hfdst); _lclose(hfdst); - if (((long) ret) < 0) { + if (((LONG)ret) < 0) { /* translate LZ errors into VIF_xxx */ switch (ret) { case LZERROR_BADINHANDLE: diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c index 4e40bfdfc16..4d3ba3f99a2 100644 --- a/dlls/version/tests/info.c +++ b/dlls/version/tests/info.c @@ -25,7 +25,7 @@ #include "winerror.h" #include "winver.h" -#define MY_LAST_ERROR -1L +#define MY_LAST_ERROR ((DWORD)-1) #define EXPECT_BAD_PATH__NOT_FOUND \ ok( (ERROR_PATH_NOT_FOUND == GetLastError()) || \ (ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || \ diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 9137ffbbe16..b362eae0035 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -173,7 +173,7 @@ static BOOL WINAPI HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, TRACE("copying header: %s\n", debugstr_w(lpszHeader)); - if( dwHeaderLength == ~0UL ) + if( dwHeaderLength == ~0U ) len = strlenW(lpszHeader); else len = dwHeaderLength; @@ -279,7 +279,7 @@ BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, len = MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, NULL, 0 ); hdr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, hdr, len ); - if( dwHeaderLength != ~0UL ) + if( dwHeaderLength != ~0U ) dwHeaderLength = len; r = HttpAddRequestHeadersW( hHttpRequest, hdr, dwHeaderLength, dwModifier ); diff --git a/include/urlmon.idl b/include/urlmon.idl index 47f82677d9c..5589a1748c2 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -1092,27 +1092,27 @@ cpp_quote("DEFINE_GUID(CLSID_MkProtocol, 0x79EAC9E6, 0xBAF9, 0x11CE, 0x8C,0x82, cpp_quote("#define MK_S_ASYNCHRONOUS 0x000401E8") cpp_quote("#define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS") -cpp_quote("#define INET_E_ERROR_FIRST 0x800C0002L") -cpp_quote("#define INET_E_INVALID_URL 0x800C0002L") -cpp_quote("#define INET_E_NO_SESSION 0x800C0003L") -cpp_quote("#define INET_E_CANNOT_CONNECT 0x800C0004L") -cpp_quote("#define INET_E_RESOURCE_NOT_FOUND 0x800C0005L") -cpp_quote("#define INET_E_OBJECT_NOT_FOUND 0x800C0006L") -cpp_quote("#define INET_E_DATA_NOT_AVAILABLE 0x800C0007L") -cpp_quote("#define INET_E_DOWNLOAD_FAILURE 0x800C0008L") -cpp_quote("#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L") -cpp_quote("#define INET_E_NO_VALID_MEDIA 0x800C000AL") -cpp_quote("#define INET_E_CONNECTION_TIMEOUT 0x800C000BL") -cpp_quote("#define INET_E_INVALID_REQUEST 0x800C000CL") -cpp_quote("#define INET_E_UNKNOWN_PROTOCOL 0x800C000DL") -cpp_quote("#define INET_E_SECURITY_PROBLEM 0x800C000EL") -cpp_quote("#define INET_E_CANNOT_LOAD_DATA 0x800C000FL") -cpp_quote("#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L") -cpp_quote("#define INET_E_USE_DEFAULT_PROTOCOLHANDLER 0x800C0011L") -cpp_quote("#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L") -cpp_quote("#define INET_E_REDIRECT_FAILED 0x800C0014L") -cpp_quote("#define INET_E_REDIRECT_TO_DIR 0x800C0015L") -cpp_quote("#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L") +cpp_quote("#define INET_E_ERROR_FIRST 0x800C0002") +cpp_quote("#define INET_E_INVALID_URL 0x800C0002") +cpp_quote("#define INET_E_NO_SESSION 0x800C0003") +cpp_quote("#define INET_E_CANNOT_CONNECT 0x800C0004") +cpp_quote("#define INET_E_RESOURCE_NOT_FOUND 0x800C0005") +cpp_quote("#define INET_E_OBJECT_NOT_FOUND 0x800C0006") +cpp_quote("#define INET_E_DATA_NOT_AVAILABLE 0x800C0007") +cpp_quote("#define INET_E_DOWNLOAD_FAILURE 0x800C0008") +cpp_quote("#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009") +cpp_quote("#define INET_E_NO_VALID_MEDIA 0x800C000A") +cpp_quote("#define INET_E_CONNECTION_TIMEOUT 0x800C000B") +cpp_quote("#define INET_E_INVALID_REQUEST 0x800C000C") +cpp_quote("#define INET_E_UNKNOWN_PROTOCOL 0x800C000D") +cpp_quote("#define INET_E_SECURITY_PROBLEM 0x800C000E") +cpp_quote("#define INET_E_CANNOT_LOAD_DATA 0x800C000F") +cpp_quote("#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010") +cpp_quote("#define INET_E_USE_DEFAULT_PROTOCOLHANDLER 0x800C0011") +cpp_quote("#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013") +cpp_quote("#define INET_E_REDIRECT_FAILED 0x800C0014") +cpp_quote("#define INET_E_REDIRECT_TO_DIR 0x800C0015") +cpp_quote("#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016") cpp_quote("#define INET_E_ERROR_LAST INET_E_REDIRECT_TO_DIR") cpp_quote("#define INET_E_DEFAULT_ACTION INET_E_USE_DEFAULT_PROTOCOLHANDLER") diff --git a/include/wincrypt.h b/include/wincrypt.h index 33b02b49e16..9eba1eeb3c1 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -1784,7 +1784,7 @@ static const WCHAR CERT_PHYSICAL_STORE_AUTH_ROOT_NAME[] = #define CERT_STORE_CERTIFICATE_CONTEXT 1 #define CERT_STORE_CRL_CONTEXT 2 #define CERT_STORE_CTL_CONTEXT 3 -#define CERT_STORE_ALL_CONTEXT_FLAG ~0UL +#define CERT_STORE_ALL_CONTEXT_FLAG ~0U #define CERT_STORE_CERTIFICATE_CONTEXT_FLAG \ (1 << CERT_STORE_CERTIFICATE_CONTEXT) #define CERT_STORE_CRL_CONTEXT_FLAG (1 << CERT_STORE_CRL_CONTEXT) diff --git a/include/winerror.h b/include/winerror.h index 31b3cb110ce..afa1ea3b97c 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -1511,9 +1511,6 @@ #define ERROR_SXS_THREAD_QUERIES_DISABLED 14010 #define ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET 14011 -#define ERROR_AUDITING_DISABLED 0xC0090001L -#define ERROR_ALL_SIDS_FILTERED 0xC0090002L - /* HRESULT values for OLE, SHELL and other Interface stuff */ /* the codes 4000-40ff are reserved for OLE */ #undef NOERROR /* arpa/nameser_compat.h defines this */ @@ -2209,4 +2206,7 @@ #define SCARD_W_CHV_BLOCKED _HRESULT_TYPEDEF_(0x8010006CL) #define SCARD_W_CARD_NOT_AUTHENTICATED _HRESULT_TYPEDEF_(0x8010006FL) +#define ERROR_AUDITING_DISABLED _HRESULT_TYPEDEF_(0xC0090001L) +#define ERROR_ALL_SIDS_FILTERED _HRESULT_TYPEDEF_(0xC0090002L) + #endif /* __WINE_WINERROR_H */