mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-07 07:18:56 +08:00
mdbx: fix MSVC warnings, add uint16-range-asserts.
Change-Id: Ie67a728035eeae250efbf962270b5c17c974db23
This commit is contained in:
committed by
Leo Yuriev
parent
2ed74ee78f
commit
3e6a672286
@@ -37,7 +37,9 @@ static int waitstatus2errcode(DWORD result) {
|
||||
/* Map a result from an NTAPI call to WIN32 error code. */
|
||||
static int ntstatus2errcode(NTSTATUS status) {
|
||||
DWORD dummy;
|
||||
OVERLAPPED ov = {status};
|
||||
OVERLAPPED ov;
|
||||
memset(&ov, 0, sizeof(ov));
|
||||
ov.Internal = status;
|
||||
return GetOverlappedResult(NULL, &ov, &dummy, FALSE) ? MDBX_SUCCESS
|
||||
: GetLastError();
|
||||
}
|
||||
@@ -759,7 +761,7 @@ int mdbx_mmap(int flags, mdbx_mmap_param_t *map, size_t length, size_t limit) {
|
||||
}
|
||||
|
||||
map->address = NULL;
|
||||
size_t ViewSize = limit;
|
||||
SIZE_T ViewSize = limit;
|
||||
rc = NtMapViewOfSection(
|
||||
map->section, GetCurrentProcess(), &map->address,
|
||||
/* ZeroBits */ 0,
|
||||
|
||||
Reference in New Issue
Block a user