From 9f456a2722a4e4d4c3ad9e21b60d814b8632bb00 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 11 Jun 2016 17:42:19 +0200 Subject: [PATCH 1/4] msys2: fixed uninitialized variable --- src/osgPlugins/zip/unzip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp index 29c87e3e9..73cae9fb4 100644 --- a/src/osgPlugins/zip/unzip.cpp +++ b/src/osgPlugins/zip/unzip.cpp @@ -2989,7 +2989,7 @@ int unzlocal_getByte(LUFILE *fin,int *pi) int unzlocal_getShort (LUFILE *fin,uLong *pX) { uLong x ; - int i; + int i = 0; int err; err = unzlocal_getByte(fin,&i); @@ -3009,7 +3009,7 @@ int unzlocal_getShort (LUFILE *fin,uLong *pX) int unzlocal_getLong (LUFILE *fin,uLong *pX) { uLong x ; - int i; + int i = 0; int err; err = unzlocal_getByte(fin,&i); From bc1185c41afd81beca46cce518064f2ffb09cc77 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 11 Jun 2016 17:43:07 +0200 Subject: [PATCH 2/4] msys2: fixed converting to non-pointer type 'long long int' from NULL --- src/osgViewer/GraphicsWindowWin32.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index 7122ce4c9..f4b1bda19 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -1674,9 +1674,9 @@ static int ChooseMatchingPixelFormat( HDC hdc, int screenNum, const WGLIntegerAt 1, // version number PFD_DRAW_TO_WINDOW | // support window PFD_SUPPORT_OPENGL | // support OpenGL - DWORD(_traits->doubleBuffer ? PFD_DOUBLEBUFFER : NULL) | // double buffered ? - DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_COPY ? PFD_SWAP_COPY : NULL) | - DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_EXCHANGE ? PFD_SWAP_EXCHANGE : NULL), + DWORD(_traits->doubleBuffer ? PFD_DOUBLEBUFFER : 0) | // double buffered ? + DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_COPY ? PFD_SWAP_COPY : 0) | + DWORD(_traits->swapMethod == osg::DisplaySettings::SWAP_EXCHANGE ? PFD_SWAP_EXCHANGE : 0), PFD_TYPE_RGBA, // RGBA type BYTE(_traits->red + _traits->green + _traits->blue), // color depth BYTE(_traits->red), 0, BYTE(_traits->green), 0, BYTE(_traits->blue), 0, // shift bits ignored From 3bf6fb1778687c45d389b91675b55f709ef1f67b Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 11 Jun 2016 17:43:49 +0200 Subject: [PATCH 3/4] msys2: fixed redefined include warnings --- src/osgDB/FileNameUtils.cpp | 2 ++ src/osgDB/FileUtils.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/osgDB/FileNameUtils.cpp b/src/osgDB/FileNameUtils.cpp index 39b4f5406..f67e527be 100644 --- a/src/osgDB/FileNameUtils.cpp +++ b/src/osgDB/FileNameUtils.cpp @@ -19,7 +19,9 @@ #include #ifdef WIN32 +#if !defined(__MINGW32__) #define _WIN32_WINNT 0x0500 +#endif #include #endif diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index 1575efcaa..7d86b3788 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -34,7 +34,10 @@ typedef char TCHAR; #include // for _mkdir #define mkdir(x,y) _mkdir((x)) + +#if !defined(__MINGW32__) #define stat64 _stati64 +#endif // set up for windows so acts just like unix access(). #ifndef F_OK From 3d9aa3ef29fd5d26e0f15695abac360522f7f665 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 11 Jun 2016 17:44:41 +0200 Subject: [PATCH 4/4] msys2: fixed ignoring #pragma warning --- examples/osgsimulation/osgsimulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/osgsimulation/osgsimulation.cpp b/examples/osgsimulation/osgsimulation.cpp index 6aa58fd36..c5509b43a 100644 --- a/examples/osgsimulation/osgsimulation.cpp +++ b/examples/osgsimulation/osgsimulation.cpp @@ -16,7 +16,7 @@ * THE SOFTWARE. */ -#ifdef WIN32 +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) ///////////////////////////////////////////////////////////////////////////// // Disable unavoidable warning messages: