icewm/icewm-1.2.30-strict-aliasing.patch

26 lines
1.3 KiB
Diff

--- src/wmapp.cc
+++ src/wmapp.cc
@@ -336,7 +336,7 @@ static void initFontPath() {
MSG(("Font path element %d: %s", n, newFontPath[n]));
#endif
- char * icewmFontPath; // ---------- find death icewm's font path ---
+ unsigned char * icewmFontPath; // ---------- find death icewm's font path ---
Atom r_type; int r_format;
unsigned long count, bytes_remain;
@@ -346,11 +346,11 @@ static void initFontPath() {
0, PATH_MAX, False, XA_STRING,
&r_type, &r_format,
&count, &bytes_remain,
- (unsigned char **) &icewmFontPath) ==
+ &icewmFontPath) ==
Success && icewmFontPath) {
if (r_type == XA_STRING && r_format == 8) {
for (int n(ndirs - 1); n > 0; --n) // ---- remove death paths ---
- if (!strcmp(icewmFontPath, newFontPath[n])) {
+ if (!strcmp((char *) icewmFontPath, newFontPath[n])) {
memmove(newFontPath + n, newFontPath + n + 1,
(ndirs - n) * sizeof(char *));
--ndirs;