Commit f91f4bd8 authored by Hanspeter Portner's avatar Hanspeter Portner

Squashed 'pugl/' changes from 035884a..2986f31

2986f31 omk: fix compiler warnings.
371c2ec omk: fix memory leak.

git-subtree-dir: pugl
git-subtree-split: 2986f3130eb5f9d0fd36e098a9b401bc5a44f4ce
parent b879fd13
......@@ -48,7 +48,8 @@ pugl_cairo_gl_free(PuglCairoGL* ctx)
}
static void
pugl_cairo_gl_configure(PuglCairoGL* ctx, int width, int height)
pugl_cairo_gl_configure(PuglCairoGL* ctx,
int width __attribute__((unused)), int height __attribute__((unused)))
{
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
......
......@@ -64,7 +64,7 @@ struct PuglViewImpl {
PuglInternals* puglInitInternals(void);
PuglView*
puglInit(int* pargc, char** argv)
puglInit(int* pargc __attribute__((unused)), char** argv __attribute__((unused)))
{
PuglView* view = (PuglView*)calloc(1, sizeof(PuglView));
if (!view) {
......
......@@ -476,6 +476,7 @@ translateEvent(PuglView* view, XEvent xevent)
if (!strcmp(type, "WM_PROTOCOLS")) {
event.type = PUGL_CLOSE;
}
XFree(type);
break;
}
case ConfigureNotify:
......@@ -521,6 +522,7 @@ translateEvent(PuglView* view, XEvent xevent)
case 7: event.scroll.dx = 1.0f; break;
}
}
__attribute__((fallthrough));
// nobreak
case ButtonRelease:
if (xevent.xbutton.button < 4 || xevent.xbutton.button > 7) {
......@@ -798,7 +800,7 @@ puglGetNativeWindow(PuglView* view)
}
void*
puglGetContext(PuglView* view)
puglGetContext(PuglView* view __attribute__((unused)))
{
#ifdef PUGL_HAVE_CAIRO
if (view->ctx_type & PUGL_CAIRO) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment