Fix strict-aliasing warning when getting generic event length.
xcb_ge_event_t has its length field in the same place that xcb_generic_reply_t does, so there's no need to cast the generic reply. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6dd8228a13
commit
eff3851ba8
|
@ -154,9 +154,7 @@ static int read_packet(xcb_connection_t *c)
|
|||
|
||||
/* XGE events may have sizes > 32 */
|
||||
if (genrep.response_type == XCB_XGE_EVENT)
|
||||
{
|
||||
eventlength = ((xcb_ge_event_t*)&genrep)->length * 4;
|
||||
}
|
||||
eventlength = genrep.length * 4;
|
||||
|
||||
buf = malloc(length + eventlength +
|
||||
(genrep.response_type == XCB_REPLY ? 0 : sizeof(uint32_t)));
|
||||
|
|
Loading…
Reference in New Issue