This patch fixes MinGW64 compiler errors below introduced by D643:
- undefined symbol ERROR_PROFILE_DOES_NOT_MATCH_DEVICE (0x7E7).
- "jump to label crosses initialization" errors.
Contributor: aligorith (Joshua Leung) as to the undefined symbol.
Changes in GHOST_Context.cpp have already been committed in the mean time.
Revisions in GHOST_ContextWGL.cpp are intended to fix compilation errors reported by @Joshua Leung (aligorith):
intern\ghost\intern\GHOST_ContextWGL.cpp: In member function 'void GHOST_ContextWGL::initContextWGLEW(PIXELFORMATDESCRIPTOR&)':
intern\ghost\intern\GHOST_ContextWGL.cpp:400:1: warning: jump to label 'finalize' [-fpermissive]
intern\ghost\intern\GHOST_ContextWGL.cpp:356:8: warning: from here [-fpermissive]
intern\ghost\intern\GHOST_ContextWGL.cpp:358:6: error: crosses initialization of 'int iPixelFormat'
I see, the values aren't used in this case, (the goto isnt reading the values)... its a bit messy but since its is simple working code, just leave it?...
That, or get a full mingw build log from ghost/win32 and collect warnings and quiet (all/most) of them.
Rather not do this piecemeal.
I think I've fixed these issues now.
I decided to remove all intermixed decls in functions that use goto, for consistency.
I would have used something like boost::optional to manage these resources, but the protocol isn't that simple.