aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-02 00:01:15 +0200
committerDavid Robillard <d@drobilla.net>2020-07-02 00:01:15 +0200
commiteb79d76891346d3e9101be8667afe98051fdbb58 (patch)
tree509d2a7f58a8913b29f4997cd1b847222c049981
parent6422c76a31f8dd73acebc5f6dca34f8423e78ecc (diff)
downloadpugl-eb79d76891346d3e9101be8667afe98051fdbb58.tar.gz
pugl-eb79d76891346d3e9101be8667afe98051fdbb58.tar.bz2
pugl-eb79d76891346d3e9101be8667afe98051fdbb58.zip
Fix cast alignment warnings on 32-bit ARM
-rw-r--r--pugl/detail/x11.c6
-rw-r--r--test/test_redisplay.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index 2d74b68..ce9e289 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -960,8 +960,10 @@ handleTimerEvent(PuglWorld* world, XEvent xevent)
for (size_t i = 0; i < world->impl->numTimers; ++i) {
if (world->impl->timers[i].alarm == notify->alarm) {
- const PuglEventTimer ev = {PUGL_TIMER, 0, world->impl->timers[i].id};
- puglDispatchEvent(world->impl->timers[i].view, (const PuglEvent*)&ev);
+ PuglEvent event = {{PUGL_TIMER, 0}};
+ event.timer.id = world->impl->timers[i].id;
+ puglDispatchEvent(world->impl->timers[i].view,
+ (const PuglEvent*)&event);
}
}
diff --git a/test/test_redisplay.c b/test/test_redisplay.c
index 0e14cf6..108a433 100644
--- a/test/test_redisplay.c
+++ b/test/test_redisplay.c
@@ -121,8 +121,10 @@ main(int argc, char** argv)
}
// Send a custom event to trigger a redisplay in the event loop
- const PuglEventClient client = { PUGL_CLIENT, 0, postRedisplayId, 0 };
- assert(!puglSendEvent(app.view, (const PuglEvent*)&client));
+ PuglEvent client_event = {{PUGL_CLIENT, 0}};
+ client_event.client.data1 = postRedisplayId;
+ client_event.client.data2 = 0;
+ assert(!puglSendEvent(app.view, &client_event));
// Loop until an expose happens in the same iteration as the redisplay
app.state = SHOULD_REDISPLAY;