Bug in kernel/event.c ob3-a6?
Mads Martin Joergensen
mmj at panther.mmj.dk
Tue Aug 26 18:08:40 EDT 2003
Hey together,
I was fixing up the "dereferencing type-punned pointer will break
strict-aliasing rules" warnings (patch in other mail), and came
across this is kernel/event.c
Since e is already passed on in the function like this:
static Window event_get_window(XEvent *e)
I doubt it should be referenced again? It could be a cut'n'paste error
from the function above where XEvent e; is used. This patch fixes if
it's a bug:
--- event.c
+++ event.c
@@ -210,9 +210,9 @@
default:
#ifdef XKB
if (extensions_xkb && e->type == extensions_xkb_event_basep) {
- switch (((XkbAnyEvent*)&e)->xkb_type) {
+ switch (((XkbAnyEvent*)e)->xkb_type) {
case XkbBellNotify:
- window = ((XkbBellNotifyEvent*)&e)->window;
+ window = ((XkbBellNotifyEvent*)e)->window;
default:
window = None;
}
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
More information about the openbox
mailing list