summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-03-18 13:17:07 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-03-18 13:17:07 -0500
commita03a06380df6054cffea0c5e66edf922898bb3e6 (patch)
tree894b9648fe7ca32b80f6e93223a527b2ceda83ed /src
parent81212cd856495ffcca3af6b9b8b7f6570f6d8e6c (diff)
winfile: fix narrowing error with gcc if LARGE_INTEGER is a union (nw)
Diffstat (limited to 'src')
-rw-r--r--src/osd/modules/file/winfile.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/osd/modules/file/winfile.cpp b/src/osd/modules/file/winfile.cpp
index 787a90957ae..c7032a4e6b5 100644
--- a/src/osd/modules/file/winfile.cpp
+++ b/src/osd/modules/file/winfile.cpp
@@ -57,7 +57,8 @@ public:
virtual error read(void *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t &actual) override
{
// attempt to set the file pointer
- LARGE_INTEGER largeOffset = { offset };
+ LARGE_INTEGER largeOffset;
+ largeOffset.QuadPart = offset;
DWORD result(SetFilePointerEx(m_handle, largeOffset, NULL, FILE_BEGIN));
if (INVALID_SET_FILE_POINTER == result)
{
@@ -77,7 +78,8 @@ public:
virtual error write(void const *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t &actual) override
{
// attempt to set the file pointer
- LARGE_INTEGER largeOffset = { offset };
+ LARGE_INTEGER largeOffset;
+ largeOffset.QuadPart = offset;
DWORD result(SetFilePointerEx(m_handle, largeOffset, NULL, FILE_BEGIN));
if (INVALID_SET_FILE_POINTER == result)
{
@@ -97,7 +99,8 @@ public:
virtual error truncate(std::uint64_t offset) override
{
// attempt to set the file pointer
- LARGE_INTEGER largeOffset = { offset };
+ LARGE_INTEGER largeOffset;
+ largeOffset.QuadPart = offset;
DWORD const result(SetFilePointerEx(m_handle, largeOffset, NULL, FILE_BEGIN));
if (INVALID_SET_FILE_POINTER == result)
{