[PATCH] Fix write to uninitialized bytes for XCB event

Pavel Sanda sanda at lyx.org
Wed Feb 19 17:13:08 UTC 2020


On Wed, Feb 19, 2020 at 05:24:46PM +0100, Enrico Forestieri wrote:
> > Did not try, but I am afraid generally it won't, because 
> > xcb_selection_notify_event_t is not enforced to have 32 bits,
> > while that's requested by underlying X routines. That's why
> > the padding by 0s.
> 
> Ok, then probably a simple
> 	alignas(32) xcb_selection_notify_event_t nev;
> would have worked.

Nice.

> We are requiring C++11 these days, right?

Can't remember, notions of gcc 4.7 in INSTALL is not strongly indicative of that ;)
Need to check whether one of my antique system still compiles with 4.7 or 4.8,
maybe we can bump to 4.8.

In any case I still tend to prefer using Qt macro (not because of technical
superiority but because if API changes then Qt folks will probably hit and
fix it sooner than we will).

Pavel


More information about the lyx-devel mailing list