- npapi.h: Correct definitions of function pointer prototypes.

- ntifs.h & cmdata.h : Don't use array size of 0. Fixes C4200.
- wdm.h: Correct definition of 64-bit SLIST_HEADER. Add explicit casts to avoid /W4 warnings in RtlEnlargedUnsignedDivide.
- winddk.h: Add MSVC intrinsic __readfsbyte for KeGetCurrentProcessorNumber. Misc fixes.
- Fix various msvc issues in cmd, setupapi, usetup, win32csr, winlogon, msafd, ws2_32 and ext2lib, most notably:
  - cmd & doskey: Don't use fishy gcc extension to allocate variable-sized arrays from the stack. Use the heap instead.
- Disable warning C4733 for mingw_main too (was only done for mingw_wmain previously).
- advapi32: Pass the correct handles to TRACE -- spotted by MSVC.
- Set the specified register in ecx in MSVC versions of Ke386Wrmsr and Ke386Rdmsr instead of reading from/writing to a random MSR. Yay /W4.

svn path=/trunk/; revision=42342
This commit is contained in:
Stefan Ginsberg 2009-08-02 17:38:27 +00:00
parent 3283ffdef8
commit 93109445ba
27 changed files with 181 additions and 100 deletions

View file

@ -25,6 +25,7 @@ INT CommandMemory (LPTSTR param)
TCHAR szAvailPageFile[40];
TCHAR szTotalVirtual[40];
TCHAR szAvailVirtual[40];
BOOL (WINAPI *GlobalMemoryStatusEx)(LPMEMORYSTATUSEX);
if (!_tcsncmp (param, _T("/?"), 2))
{
@ -32,8 +33,8 @@ INT CommandMemory (LPTSTR param)
return 0;
}
BOOL (WINAPI *GlobalMemoryStatusEx)(LPMEMORYSTATUSEX)
= GetProcAddress(GetModuleHandle(_T("KERNEL32")), "GlobalMemoryStatusEx");
GlobalMemoryStatusEx
= (BOOL (WINAPI *)(LPMEMORYSTATUSEX))GetProcAddress(GetModuleHandle(_T("KERNEL32")), "GlobalMemoryStatusEx");
if (GlobalMemoryStatusEx)
{
msex.dwLength = sizeof(MEMORYSTATUSEX);