pugl_win.cpp: In function 'void puglLeaveContext(PuglView*, bool)':
pugl_win.cpp:112:17: warning: 'ps' may be used uninitialized [-Wmaybe-uninitialized]
112 | EndPaint(view->impl->hwnd, &ps);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /mxe/usr/x86_64-w64-mingw32.static/include/windows.h:72,
from pugl_win.cpp:21:
/mxe/usr/x86_64-w64-mingw32.static/include/winuser.h:3550:29: note: by argument 2 of type 'const PAINTSTRUCT*' {aka 'const tagPAINTSTRUCT*'} to 'WINBOOL EndPaint(HWND, const PAINTSTRUCT*)' declared here
3550 | WINUSERAPI WINBOOL WINAPI EndPaint(HWND hWnd,CONST PAINTSTRUCT *lpPaint);
| ^~~~~~~~
pugl_win.cpp:111:21: note: 'ps' declared here
111 | PAINTSTRUCT ps;
| ^~
I am getting a warning about the PAINTSTRUCT argument for EndPaint in my version of pugl (which has diverged from yours a bit), for this
https://github.com/lv2/pugl/blob/3e6504247e5eb05fb9e326f8550daa5e2a18737a/src/win_gl.c#L279
As far as I understand the documentation
pugl should keep the PAINTSTRUCT value generated by BeginPaint() here and pass it to EndPaint() later on.