Fix all MSVC static analyzer warnings. (a few are suppressed after checking that it's ok)
Fixes a number of missing or wrong function return checks, wrong printf format specifiers and a few other things,
svn path=/trunk/; revision=66646
Move __analysis_assume to sal.h (like in newer Windows SDKs) and define it (together with _Analysis_assume_) to "((void)0)" instead of to nothing, to allow it to be used with a comma.
svn path=/trunk/; revision=66643
- Make NT_ASSERT() give the MSVC static analyzer a hint that the condition can now be excpected to be true. This adds __analysis_unreachable(), which uses __assume(0) on _PREFAST_ builds. This is neccessary, since it seems impossible to make MSVC respect __analysis_noreturn / __declspec(noreturn) on an intrinsic prototype like __int2c().
svn path=/trunk/; revision=66642
Update ntgdi.h:
- Change some return types from VOID to NTSTATUS. This was done recently on Windows, but there shouldn't be a compatibility issue with returning an NTSTATUS value instead of the random contents of the eax register.
- Change 2 parameters from VOID* to DRIVER_INFO_2W* and 2 parameters from VOID* to POINTL*
- Add annotations
svn path=/trunk/; revision=66641
- Pass size in bytes to UnsafeSetBitmapBits from NtGdiCreateBitmap
- In NtGdiSetBitmapBits check for stock bitmap and non-API bitmap.
svn path=/trunk/; revision=66616
- Remove wrong flags when initializing a DC
- Set DC::prgnattr before potentially passing it to the cleanup function after failure to create a handle. Add a comment that this is not actually enough. Will be fixed, once we use C++
- Increase GDI object stack levels to 20
svn path=/trunk/; revision=66615
Make sure a region is reasonably initialized, before potentially passing it to the cleanup function, when failing to create a handle.
svn path=/trunk/; revision=66614
NtGdiSetDIBitsToDeviceInternal: Check for ScanLines == 0 and clean up exit pathes. Fixes assertion failure in gdi32_winetest:bitmap
svn path=/trunk/; revision=66612
- Pass bitmap buffer size to SURFACE_AllocSurface and validate it
- Fix arithmetic overflow checks by using RtlULongMult
- GreExtTextOutW: do not allocate / blit zero sized bitmaps
- NtGdiStretchDIBitsInternal: do not pass negative y size to GreCreateBitmapEx
- DIB_CreateDIBSection: use calculated bitmap size, instead of biSizeImage when calculating the section view size and as size parameter to GreCreateBitmapEx
CORE-9245 #resolve
svn path=/trunk/; revision=66611
- revert an "improvement" in NtUserFindExistingCursorIcon
- Remove boken asserts
- Implement GreSetBitmapOwner and use it to set bitmap owner in IntSetCursorData
- Fix cleanup after failure in setting bitmap owner
- Fix string cleanup (don't free INTRESOURCE)
- Validate frame indices to be within range
- Make sure frame indices and JIR reates are copied
- A few other fixes/improvements
svn path=/trunk/; revision=66608
- fix multiple bugs in software bus pnp enumerator
[INF]
- add wdmaud.sys as a client of the software bus pnp enumerator
svn path=/trunk/; revision=66600
Add some missing intrinsics for GCC (_InterlockedExchangeAdd8, __incgsqword, _BitScanForward64, _BitScanReverse64, _bittest64, _bittestandset64, _bittestandreset64, _bittestandcomplement64, _rotr64, _lrotl, _lrotr, __lzcnt, __lzcnt16, __popcnt, __popcnt16, __lzcnt64, __popcnt64, __cpuidex, __ud2, __writecr8/__readcr8 (x86))
Remove useless top level const modifiers from parameters (they do only tell the compiler that the variable cannot be modified, they do not tell the compiler whether the parameter is a compiler constant!)
svn path=/trunk/; revision=66598