diff options
| author | Martin Ridgers <[email protected]> | 2021-12-08 10:23:31 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-12-08 10:23:31 +0100 |
| commit | c9a574b9faf92c731497ae35cc2468021f4f0f5d (patch) | |
| tree | 556d4de2724dae0db31c5610064fc7137c63734b /zencore/iobuffer.cpp | |
| parent | A 'long int' is larger on non-Windows causing narrowing warnings (diff) | |
| download | zen-c9a574b9faf92c731497ae35cc2468021f4f0f5d.tar.xz zen-c9a574b9faf92c731497ae35cc2468021f4f0f5d.zip | |
Dependent variable definition as inside a if-Windows block
Diffstat (limited to 'zencore/iobuffer.cpp')
| -rw-r--r-- | zencore/iobuffer.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index 656bbb705..2d88c4cb5 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -246,6 +246,7 @@ IoBufferExtendedCore::Materialize() const if (m_Flags.load(std::memory_order_relaxed) & kIsMaterialized) return; + void* NewMmapHandle; uint32_t NewFlags = kIsMaterialized; const uint64_t MapOffset = m_FileOffset & ~0xffffull; @@ -253,12 +254,12 @@ IoBufferExtendedCore::Materialize() const const uint64_t MapSize = m_DataBytes + MappedOffsetDisplacement; #if ZEN_PLATFORM_WINDOWS - void* NewMmapHandle = CreateFileMapping(m_FileHandle, - /* lpFileMappingAttributes */ nullptr, - /* flProtect */ PAGE_READONLY, - /* dwMaximumSizeLow */ 0, - /* dwMaximumSizeHigh */ 0, - /* lpName */ nullptr); + NewMmapHandle = CreateFileMapping(m_FileHandle, + /* lpFileMappingAttributes */ nullptr, + /* flProtect */ PAGE_READONLY, + /* dwMaximumSizeLow */ 0, + /* dwMaximumSizeHigh */ 0, + /* lpName */ nullptr); if (NewMmapHandle == nullptr) { |