File xclass-0.9.2-gcc-4.1.patch of Package xclass
--- lib/libxclass/OXHtmlIndex.cc
+++ lib/libxclass/OXHtmlIndex.cc
@@ -242,7 +242,10 @@
while (*cp && x < 2) {
cnt = 0;
i = 1;
- while (i < 45 && isdigit(cp[i])) nbuf[i-1] = cp[i++];
+ while (i < 45 && isdigit(cp[i])) {
+ nbuf[i-1] = cp[i];
+ i++;
+ }
if (i > 1) {
nbuf[i-1] = 0;
cnt = atoi(nbuf);
--- lib/libxclass/OXSList.cc
+++ lib/libxclass/OXSList.cc
@@ -202,10 +202,12 @@
Bool OXSList::Remove(int id) {
OXSNode *item;
+ XPointer tmp;
- if ((XFindContext(_dpy, id, _context, (XPointer *)&item)) == XCNOENT)
+ if ((XFindContext(_dpy, id, _context, &tmp)) == XCNOENT)
return False;
+ memcpy(&item, &tmp, sizeof(char*));
_Unlink(item);
XDeleteContext(_dpy, id, _context);
delete item;
@@ -215,9 +217,12 @@
OXSNode *OXSList::GetNode(int id) {
OXSNode *item;
+ XPointer tmp;
- if ((XFindContext(_dpy, id, _context, (XPointer *)&item)) == XCNOENT)
+ if ((XFindContext(_dpy, id, _context, &tmp)) == XCNOENT)
return NULL;
+ memcpy(&item, &tmp, sizeof(char*));
+
return item;
}