Bugzilla – Attachment 64314 Details for
Bug 143861
icewm restarts itself infinitely
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Fixed patch for strict-aliasing fix
icewm-1.2.23-strict-aliasing.patch (text/plain), 8.17 KB, created by
Takashi Iwai
on 2006-01-20 16:14:14 UTC
(
hide
)
Description:
Fixed patch for strict-aliasing fix
Filename:
MIME Type:
Creator:
Takashi Iwai
Created:
2006-01-20 16:14:14 UTC
Size:
8.17 KB
patch
obsolete
>--- src/wmapp.cc >+++ src/wmapp.cc >@@ -290,7 +290,7 @@ > 0, PATH_MAX, False, XA_STRING, > &r_type, &r_format, > &count, &bytes_remain, >- (unsigned char **) &icewmFontPath) == >+ (char **) &icewmFontPath) == > Success && icewmFontPath) { > if (r_type == XA_STRING && r_format == 8) { > for (int n(ndirs - 1); n > 0; --n) // ---- remove death paths --- >--- src/wmclient.cc >+++ src/wmclient.cc >@@ -815,6 +815,7 @@ > > #ifndef NO_MWM_HINTS > void YFrameClient::getMwmHints() { >+ char *tmp=NULL; > if (!prop.mwm_hints) > return; > >@@ -829,11 +830,13 @@ > if (XGetWindowProperty(xapp->display(), handle(), > _XATOM_MWM_HINTS, 0L, 20L, False, _XATOM_MWM_HINTS, > &retType, &retFormat, &retCount, >- &remain, (unsigned char **)&fMwmHints) == Success && fMwmHints) >+ &remain, (char **)&tmp) == Success && tmp){ >+ memcpy(&fMwmHints,&tmp,sizeof(char *)); > if (retCount >= PROP_MWM_HINTS_ELEMENTS) > return; > else > XFree(fMwmHints); >+ } > fMwmHints = 0; > } > >@@ -1348,6 +1351,7 @@ > } > > void YFrameClient::getWindowRole() { >+ char *tmp=NULL; > if (!prop.window_role) > return; > >@@ -1363,8 +1367,9 @@ > 0, 256, False, XA_STRING, > &r_type, &r_format, > &count, &bytes_remain, >- (unsigned char **)&role) == Success && role) >+ (char **)&tmp) == Success && tmp) > { >+ memcpy(&role,&tmp,sizeof(char *)); > if (r_type == XA_STRING && r_format == 8) { > MSG(("window_role=%s", role)); > } else { >@@ -1392,7 +1397,7 @@ > 0, 256, False, XA_STRING, > &r_type, &r_format, > &count, &bytes_remain, >- (unsigned char **)&role) == Success && role) >+ (char **)&role) == Success && role) > { > if (r_type == XA_STRING && r_format == 8) { > MSG(("wm_window_role=%s", role)); >@@ -1421,7 +1426,7 @@ > _XA_SM_CLIENT_ID, > 0, 256, False, XA_STRING, > &r_type, &r_format, >- &count, &bytes_remain, (unsigned char **)&cid) == Success && cid) >+ &count, &bytes_remain, (char **)&cid) == Success && cid) > { > if (r_type == XA_STRING && r_format == 8) { > //msg("cid=%s", cid); >--- src/wmframe.cc >+++ src/wmframe.cc >@@ -706,6 +706,7 @@ > } > > void YFrameWindow::configureClient(const XConfigureRequestEvent &configureRequest) { >+ char *tmp; > client()->setBorder((configureRequest.value_mask & CWBorderWidth) ? configureRequest.border_width : client()->getBorder()); > > int cx, cy, cw, ch; >@@ -721,8 +722,10 @@ > XFindContext(xapp->display(), > configureRequest.above, > clientContext, >- (XPointer *)&sibling) == 0) >+ (XPointer *)&tmp) == 0){ >+ memcpy(&sibling,&tmp,sizeof(char *)); > xwc.sibling = sibling->handle(); >+ } > else > xwc.sibling = configureRequest.above; > >--- src/wmmgr.cc >+++ src/wmmgr.cc >@@ -752,20 +752,25 @@ > > YFrameWindow *YWindowManager::findFrame(Window win) { > YFrameWindow *frame; >+ char *tmp; > > if (XFindContext(xapp->display(), win, >- frameContext, (XPointer *)&frame) == 0) >+ frameContext, (XPointer *)&tmp) == 0){ >+ memcpy(&frame,&tmp,sizeof(char *)); > return frame; >+ } > else > return 0; > } > > YFrameClient *YWindowManager::findClient(Window win) { > YFrameClient *client; >- >+ char *tmp; > if (XFindContext(xapp->display(), win, >- clientContext, (XPointer *)&client) == 0) >+ clientContext, (XPointer *)&tmp) == 0){ >+ memcpy(&client,&tmp,sizeof(char *)); > return client; >+ } > else > return 0; > } >--- src/yinput.cc >+++ src/yinput.cc >@@ -418,13 +418,13 @@ > selection.target, &type, &format, > (unsigned long *)&nitems, > (unsigned long *)&extra, >- (unsigned char **)&data); >+ (char **)&data); > > if (nitems > 0 && data != NULL) { > replaceSelection(data, nitems); > } > if (data != NULL) >- XFree(data); >+ XFree((void *)data); > } > } > >--- src/ywindow.cc >+++ src/ywindow.cc >@@ -1387,6 +1387,7 @@ > } > > void YWindow::handleXdnd(const XClientMessageEvent &message) { >+ char *tmp; > if (message.message_type == XA_XdndEnter) { > MSG(("XdndEnter source=%lX", message.data.l[0])); > XdndDragSource = message.data.l[0]; >@@ -1396,8 +1397,10 @@ > YWindow *win; > > if (XFindContext(xapp->display(), XdndDropTarget, windowContext, >- (XPointer *)&win) == 0) >- win->handleDNDLeave(); >+ (XPointer *)&tmp) == 0){ >+ memcpy(&win,&tmp,sizeof(char *)); >+ win->handleDNDLeave(); >+ } > XdndDropTarget = None; > } > XdndDragSource = None; >@@ -1440,16 +1443,19 @@ > YWindow *win; > > if (XFindContext(xapp->display(), XdndDropTarget, windowContext, >- (XPointer *)&win) == 0) >- win->handleDNDLeave(); >+ (XPointer *)&tmp) == 0){ >+ memcpy(&win,&tmp,sizeof(char *)); >+ win->handleDNDLeave(); >+ } > } > XdndDropTarget = target; > if (XdndDropTarget) { > YWindow *win; > > if (XFindContext(xapp->display(), XdndDropTarget, windowContext, >- (XPointer *)&win) == 0) >+ (XPointer *)&tmp) == 0) > { >+ memcpy(&win,&tmp,sizeof(char *)); > win->handleDNDEnter(); > pwin = win; > } >@@ -1457,8 +1463,10 @@ > } > if (pwin == 0 && XdndDropTarget) { // !!! optimize this > if (XFindContext(xapp->display(), XdndDropTarget, windowContext, >- (XPointer *)&pwin) != 0) >+ (XPointer *)&tmp) != 0){ >+ memcpy(&pwin,&tmp,sizeof(char *)); > pwin = 0; >+ } > } > if (pwin) > pwin->handleDNDPosition(nx, ny); >--- src/yxapp.cc >+++ src/yxapp.cc >@@ -505,14 +505,15 @@ > > void YXApplication::handleGrabEvent(YWindow *winx, XEvent &xev) { > YWindow *win = winx; >- >+ char *tmp; > PRECONDITION(win != 0); > if (fGrabTree) { > if (xev.xbutton.subwindow != None) { > if (XFindContext(display(), > xev.xbutton.subwindow, > windowContext, >- (XPointer *)&win) != 0); >+ (XPointer *)&tmp) != 0); >+ memcpy(&win,&tmp,sizeof(char *)); > if (xev.type == EnterNotify || xev.type == LeaveNotify) > win = 0; > else >@@ -521,7 +522,8 @@ > if (XFindContext(display(), > xev.xbutton.window, > windowContext, >- (XPointer *)&win) != 0) >+ (XPointer *)&tmp)!= 0) >+ memcpy(&win,&tmp,sizeof(char *)); > if (xev.type == EnterNotify || xev.type == LeaveNotify) > win = 0; > else >@@ -885,12 +887,14 @@ > void YXApplication::handleWindowEvent(Window xwindow, XEvent &xev) { > int rc = 0; > YWindow *window = 0; >- >+ char *tmp; > if ((rc = XFindContext(display(), > xwindow, > windowContext, >- (XPointer *)&window)) == 0) >+ (XPointer *)&tmp)) == 0) >+ > { >+ memcpy(&window,&tmp,sizeof(char *)); > window->handleEvent(xev); > } else { > if (xev.type == MapRequest) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 143861
: 64314