Left one cast behind that is necessary to change from const char *
to char * in src/xlibi18n/lcCharSet.c.

Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
---
 modules/im/ximcp/imDefIm.c  |    4 +--
 modules/im/ximcp/imLcIm.c   |    2 +-
 modules/im/ximcp/imThaiIm.c |    2 +-
 modules/lc/def/lcDefConv.c  |    4 +--
 modules/lc/gen/lcGenConv.c  |   22 +++++++--------
 modules/lc/xlocale/lcEuc.c  |    2 +-
 modules/lc/xlocale/lcJis.c  |    4 +--
 modules/lc/xlocale/lcSjis.c |    2 +-
 src/Context.c               |   12 ++++----
 src/FetchName.c             |    4 +--
 src/Font.c                  |   66 +++++++++++++++++++++----------------------
 src/FontInfo.c              |   18 ++++++------
 src/FontNames.c             |    4 +--
 src/FreeEData.c             |    4 +--
 src/FreeGC.c                |    2 +-
 src/GetFPath.c              |    4 +--
 src/GetHints.c              |   24 ++++++++--------
 src/GetNrmHint.c            |    4 +--
 src/GetRGBCMap.c            |   10 +++----
 src/GetStCmap.c             |    6 ++--
 src/GetWMCMapW.c            |    2 +-
 src/GetWMProto.c            |    2 +-
 src/ImUtil.c                |    8 +++---
 src/InitExt.c               |    2 +-
 src/IntAtom.c               |    6 ++--
 src/KeyBind.c               |   12 ++++----
 src/ListExt.c               |    6 ++--
 src/ModMap.c                |    8 +++---
 src/OpenDis.c               |   20 ++++++-------
 src/PolyReg.c               |    6 ++--
 src/PutImage.c              |    6 ++--
 src/QuColors.c              |    2 +-
 src/Quarks.c                |    2 +-
 src/RdBitF.c                |    4 +--
 src/Region.c                |    6 ++--
 src/RegstFlt.c              |    4 +--
 src/SetFPath.c              |    2 +-
 src/SetHints.c              |    2 +-
 src/SetRGBCMap.c            |    2 +-
 src/StBytes.c               |    2 +-
 src/TextToStr.c             |    4 +--
 src/VisUtil.c               |    4 +--
 src/Xrm.c                   |   28 +++++++++---------
 src/locking.c               |   12 ++++----
 src/xcms/CvCols.c           |    4 +--
 src/xcms/LRGB.c             |   36 +++++++++++------------
 src/xcms/SetGetCols.c       |    8 +++---
 src/xcms/StCols.c           |    2 +-
 src/xcms/cmsCmap.c          |    6 ++--
 src/xlibi18n/ICWrap.c       |   12 ++++----
 src/xlibi18n/IMWrap.c       |    2 +-
 src/xlibi18n/lcCT.c         |    2 +-
 src/xlibi18n/lcCharSet.c    |    4 +--
 src/xlibi18n/lcConv.c       |    4 +--
 src/xlibi18n/lcDB.c         |   10 +++----
 src/xlibi18n/lcRM.c         |    6 ++--
 src/xlibi18n/lcUTF8.c       |    4 +--
 src/xlibi18n/mbWMProps.c    |    4 +--
 src/xlibi18n/utf8WMProps.c  |    4 +--
 59 files changed, 230 insertions(+), 230 deletions(-)

diff --git a/modules/im/ximcp/imDefIm.c b/modules/im/ximcp/imDefIm.c
index 866161f..9168135 100644
--- a/modules/im/ximcp/imDefIm.c
+++ b/modules/im/ximcp/imDefIm.c
@@ -1105,10 +1105,10 @@ _XimProtoCloseIM(
        next = ic->core.next;
 #ifdef XIM_CONNECTABLE
        if (!(!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im))) {
-           Xfree ((char *) ic);
+           Xfree (ic);
        }
 #else
-       Xfree ((char *) ic);
+       Xfree (ic);
 #endif /* XIM_CONNECTABLE */
        ic = next;
     }
diff --git a/modules/im/ximcp/imLcIm.c b/modules/im/ximcp/imLcIm.c
index 6456d7b..3ab2dfc 100644
--- a/modules/im/ximcp/imLcIm.c
+++ b/modules/im/ximcp/imLcIm.c
@@ -231,7 +231,7 @@ _XimLocalCloseIM(
     while (ic) {
        (*ic->methods->destroy) (ic);
        next = ic->core.next;
-       Xfree ((char *) ic);
+       Xfree (ic);
        ic = next;
     }
     _XimLocalIMFree(im);
diff --git a/modules/im/ximcp/imThaiIm.c b/modules/im/ximcp/imThaiIm.c
index 793ed36..c96fad9 100644
--- a/modules/im/ximcp/imThaiIm.c
+++ b/modules/im/ximcp/imThaiIm.c
@@ -227,7 +227,7 @@ _XimThaiCloseIM(XIM xim)
     while (ic) {
        (*ic->methods->destroy) (ic);
        next = ic->core.next;
-       Xfree ((char *) ic);
+       Xfree (ic);
        ic = next;
     }
     _XimThaiIMFree(im);
diff --git a/modules/lc/def/lcDefConv.c b/modules/lc/def/lcDefConv.c
index a17d358..3cd5c22 100644
--- a/modules/lc/def/lcDefConv.c
+++ b/modules/lc/def/lcDefConv.c
@@ -564,9 +564,9 @@ close_converter(
     XlcConv conv)
 {
     if (conv->state)
-       Xfree((char *) conv->state);
+       Xfree(conv->state);
 
-    Xfree((char *) conv);
+    Xfree(conv);
 }
 
 static XlcConv
diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
index 4edc125..1f7c301 100644
--- a/modules/lc/gen/lcGenConv.c
+++ b/modules/lc/gen/lcGenConv.c
@@ -1224,7 +1224,7 @@ stdc_wcstocts(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -1544,7 +1544,7 @@ stdc_ctstowcs(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -1580,7 +1580,7 @@ stdc_cstowcs(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -1616,7 +1616,7 @@ mbstocts(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -2063,7 +2063,7 @@ stdc_wcstostr(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -2338,7 +2338,7 @@ ctstombs(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -2374,7 +2374,7 @@ cstombs(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -2583,7 +2583,7 @@ stdc_strtowcs(
 
 ret:
     if (buf)
-       Xfree((char *)buf);
+       Xfree(buf);
 
     return (unconv_num1 + unconv_num2);
 }
@@ -2597,14 +2597,14 @@ close_converter(
     XlcConv conv)
 {
     if (conv->state) {
-       Xfree((char *) conv->state);
+       Xfree(conv->state);
     }
 
     if (conv->methods) {
-       Xfree((char *) conv->methods);
+       Xfree(conv->methods);
     }
 
-    Xfree((char *) conv);
+    Xfree(conv);
 }
 
 /* -------------------------------------------------------------------------- 
*/
diff --git a/modules/lc/xlocale/lcEuc.c b/modules/lc/xlocale/lcEuc.c
index 6917a04..5b171a9 100644
--- a/modules/lc/xlocale/lcEuc.c
+++ b/modules/lc/xlocale/lcEuc.c
@@ -1363,7 +1363,7 @@ static void
 close_converter(
     XlcConv conv)
 {
-       Xfree((char *) conv);
+       Xfree(conv);
 }
 
 enum { MBSTOCS, WCSTOCS, MBTOCS, CSTOMBS, CSTOWCS, MBSTOWCS, WCSTOMBS,
diff --git a/modules/lc/xlocale/lcJis.c b/modules/lc/xlocale/lcJis.c
index dc2822e..a6917cf 100644
--- a/modules/lc/xlocale/lcJis.c
+++ b/modules/lc/xlocale/lcJis.c
@@ -520,10 +520,10 @@ close_converter(
     XlcConv conv)
 {
     if (conv->state) {
-       Xfree((char *) conv->state);
+       Xfree(conv->state);
     }
 
-    Xfree((char *) conv);
+    Xfree(conv);
 }
 
 static XlcConv
diff --git a/modules/lc/xlocale/lcSjis.c b/modules/lc/xlocale/lcSjis.c
index eb5e4ca..ac94557 100644
--- a/modules/lc/xlocale/lcSjis.c
+++ b/modules/lc/xlocale/lcSjis.c
@@ -1420,7 +1420,7 @@ static void
 close_converter(
     XlcConv conv)
 {
-       Xfree((char *) conv);
+       Xfree(conv);
 }
 
 
diff --git a/src/Context.c b/src/Context.c
index 4bb465b..8a07871 100644
--- a/src/Context.c
+++ b/src/Context.c
@@ -126,7 +126,7 @@ static void ResizeTable(DB db)
            *head = entry;
        }
     }
-    Xfree((char *) otable);
+    Xfree(otable);
 }
 
 static void _XFreeContextDB(Display *display)
@@ -140,12 +140,12 @@ static void _XFreeContextDB(Display *display)
        for (i = db->mask + 1, pentry = db->table ; --i >= 0; pentry++) {
            for (entry = *pentry; entry; entry = next) {
                next = entry->next;
-               Xfree((char *)entry);
+               Xfree(entry);
            }
        }
-       Xfree((char *) db->table);
+       Xfree(db->table);
        _XFreeMutex(&db->linfo);
-       Xfree((char *) db);
+       Xfree(db);
     }
 }
 
@@ -186,7 +186,7 @@ int XSaveContext(
        db->mask = INITHASHMASK;
        db->table = Xcalloc(db->mask + 1, sizeof(TableEntry));
        if (!db->table) {
-           Xfree((char *)db);
+           Xfree(db);
            return XCNOMEM;
        }
        db->numentries = 0;
@@ -289,7 +289,7 @@ int XDeleteContext(Display *display, XID rid, XContext 
context)
         prev = &entry->next) {
        if (entry->rid == rid && entry->context == context) {
            *prev = entry->next;
-           Xfree((char *) entry);
+           Xfree(entry);
            db->numentries--;
            if (db->numentries < db->mask && db->mask > INITHASHMASK)
                ResizeTable(db);
diff --git a/src/FetchName.c b/src/FetchName.c
index 22bd460..8605a6d 100644
--- a/src/FetchName.c
+++ b/src/FetchName.c
@@ -58,7 +58,7 @@ Status XFetchName (
        *name = (char *)data;
        return(1);
        }
-    if (data) Xfree ((char *)data);
+    if (data) Xfree (data);
     *name = NULL;
     return(0);
 }
@@ -89,7 +89,7 @@ Status XGetIconName (
        *icon_name = (char*)data;
        return(1);
        }
-    if (data) Xfree ((char *)data);
+    if (data) Xfree (data);
     *icon_name = NULL;
     return(0);
 }
diff --git a/src/Font.c b/src/Font.c
index ac18024..6fadd58 100644
--- a/src/Font.c
+++ b/src/Font.c
@@ -166,13 +166,13 @@ XFreeFont(
 #ifdef USE_XF86BIGFONT
        _XF86BigfontFreeFontMetrics(fs);
 #else
-       Xfree ((char *) fs->per_char);
+       Xfree (fs->per_char);
 #endif
     }
     _XFreeExtData(fs->ext_data);
     if (fs->properties)
-       Xfree ((char *) fs->properties);
-    Xfree ((char *) fs);
+       Xfree (fs->properties);
+    Xfree (fs);
     return 1;
 }
 
@@ -249,7 +249,7 @@ _XQueryFont (
                fs->properties = Xmalloc (pbytes);
            }
            if (! fs->properties) {
-               Xfree((char *) fs);
+               Xfree(fs);
                _XEatDataWords(dpy, reply_left);
                return (XFontStruct *)NULL;
            }
@@ -271,8 +271,8 @@ _XQueryFont (
            }
        }
        if (! fs->per_char) {
-           if (fs->properties) Xfree((char *) fs->properties);
-           Xfree((char *) fs);
+           if (fs->properties) Xfree(fs->properties);
+           Xfree(fs);
            _XEatDataWords(dpy, reply_left);
            return (XFontStruct *)NULL;
        }
@@ -493,7 +493,7 @@ _XF86BigfontQueryFont (
            fs->properties = Xmalloc (pbytes);
        }
        if (! fs->properties) {
-           Xfree((char *) fs);
+           Xfree(fs);
            _XEatDataWords(dpy, reply_left);
            return (XFontStruct *)NULL;
        }
@@ -507,8 +507,8 @@ _XF86BigfontQueryFont (
        any real font needs, so the combined total doesn't overflow either */
     if (reply.nUniqCharInfos > ((ULONG_MAX / 2) / SIZEOF(xCharInfo)) ||
        reply.nCharInfos > ((ULONG_MAX / 2) / sizeof(CARD16))) {
-       Xfree((char *) fs->properties);
-       Xfree((char *) fs);
+       Xfree(fs->properties);
+       Xfree(fs);
        _XEatDataWords(dpy, reply_left);
        return (XFontStruct *)NULL;
     }
@@ -524,15 +524,15 @@ _XF86BigfontQueryFont (
                     + (reply.nCharInfos+1)/2 * 2 * sizeof(CARD16);
            pUniqCI = Xmalloc (nbytes);
            if (!pUniqCI) {
-               if (fs->properties) Xfree((char *) fs->properties);
-               Xfree((char *) fs);
+               if (fs->properties) Xfree(fs->properties);
+               Xfree(fs);
                _XEatDataWords(dpy, reply_left);
                return (XFontStruct *)NULL;
            }
            if (! (fs->per_char = Xmalloc (reply.nCharInfos * 
sizeof(XCharStruct)))) {
-               Xfree((char *) pUniqCI);
-               if (fs->properties) Xfree((char *) fs->properties);
-               Xfree((char *) fs);
+               Xfree(pUniqCI);
+               if (fs->properties) Xfree(fs->properties);
+               Xfree(fs);
                _XEatDataWords(dpy, reply_left);
                return (XFontStruct *)NULL;
            }
@@ -541,15 +541,15 @@ _XF86BigfontQueryFont (
            for (i = 0; i < reply.nCharInfos; i++) {
                if (pIndex2UniqIndex[i] >= reply.nUniqCharInfos) {
                    fprintf(stderr, "_XF86BigfontQueryFont: server returned 
wrong data\n");
-                   Xfree((char *) pUniqCI);
-                   if (fs->properties) Xfree((char *) fs->properties);
-                   Xfree((char *) fs);
+                   Xfree(pUniqCI);
+                   if (fs->properties) Xfree(fs->properties);
+                   Xfree(fs);
                    return (XFontStruct *)NULL;
                }
                /* XXX the next statement won't work if short isn't 16 bits */
                fs->per_char[i] = * (XCharStruct *) 
&pUniqCI[pIndex2UniqIndex[i]];
            }
-           Xfree((char *) pUniqCI);
+           Xfree(pUniqCI);
        } else {
 #ifdef HAS_SHM
            XExtData *pData;
@@ -558,8 +558,8 @@ _XF86BigfontQueryFont (
 
            pData = Xmalloc(sizeof(XExtData));
            if (!pData) {
-               if (fs->properties) Xfree((char *) fs->properties);
-               Xfree((char *) fs);
+               if (fs->properties) Xfree(fs->properties);
+               Xfree(fs);
                return (XFontStruct *)NULL;
            }
 
@@ -577,9 +577,9 @@ _XF86BigfontQueryFont (
            if ((addr = shmat(reply.shmid, NULL, SHM_RDONLY)) == (char *)-1) {
                if (extcodes->serverCapabilities & CAP_VerifiedLocal)
                    fprintf(stderr, "_XF86BigfontQueryFont: could not attach 
shm segment\n");
-               Xfree((char *) pData);
-               if (fs->properties) Xfree((char *) fs->properties);
-               Xfree((char *) fs);
+               Xfree(pData);
+               if (fs->properties) Xfree(fs->properties);
+               Xfree(fs);
                /* Stop requesting shared memory transport from now on. */
                extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm;
                return (XFontStruct *)NULL;
@@ -592,9 +592,9 @@ _XF86BigfontQueryFont (
                      && buf.shm_segsz >= reply.shmsegoffset + reply.nCharInfos 
* sizeof(XCharStruct) + sizeof(CARD32)
                      && *(CARD32 *)(addr + reply.shmsegoffset + 
reply.nCharInfos * sizeof(XCharStruct)) == extcodes->serverSignature)) {
                    shmdt(addr);
-                   Xfree((char *) pData);
-                   if (fs->properties) Xfree((char *) fs->properties);
-                   Xfree((char *) fs);
+                   Xfree(pData);
+                   if (fs->properties) Xfree(fs->properties);
+                   Xfree(fs);
                    /* Stop requesting shared memory transport from now on. */
                    extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm;
                    return (XFontStruct *)NULL;
@@ -611,8 +611,8 @@ _XF86BigfontQueryFont (
            fs->per_char = (XCharStruct *) (addr + reply.shmsegoffset);
 #else
            fprintf(stderr, "_XF86BigfontQueryFont: try recompiling libX11 with 
HasShm, Xserver has shm support\n");
-           if (fs->properties) Xfree((char *) fs->properties);
-           Xfree((char *) fs);
+           if (fs->properties) Xfree(fs->properties);
+           Xfree(fs);
            /* Stop requesting shared memory transport from now on. */
            extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm;
            return (XFontStruct *)NULL;
@@ -638,9 +638,9 @@ _XF86BigfontFreeFontMetrics (XFontStruct *fs)
                                      XF86BigfontNumber)))
        shmdt ((char *) pData->private_data);
     else
-       Xfree ((char *) fs->per_char);
+       Xfree (fs->per_char);
 #else
-    Xfree ((char *) fs->per_char);
+    Xfree (fs->per_char);
 #endif
 }
 
@@ -693,14 +693,14 @@ int _XF86LoadQueryLocaleFont(
 #ifdef USE_XF86BIGFONT
            _XF86BigfontFreeFontMetrics(fs);
 #else
-           Xfree ((char *) fs->per_char);
+           Xfree (fs->per_char);
 #endif
        }
        _XFreeExtData(fs->ext_data);
        if (fs->properties)
-           Xfree ((char *) fs->properties);
+           Xfree (fs->properties);
        *fidp = fs->fid;
-       Xfree ((char *) fs);
+       Xfree (fs);
     } else {
        XFreeFont(dpy, fs);
     }
diff --git a/src/FontInfo.c b/src/FontInfo.c
index 0cb5b19..763aafb 100644
--- a/src/FontInfo.c
+++ b/src/FontInfo.c
@@ -107,7 +107,7 @@ XFontStruct **info) /* RETURN */
                if (! (finfo = Xmalloc(sizeof(XFontStruct) * size)))
                    goto clearwire;
                if (! (flist = Xmalloc(sizeof(char *) * (size+1)))) {
-                   Xfree((char *) finfo);
+                   Xfree(finfo);
                    goto clearwire;
                }
            }
@@ -152,7 +152,7 @@ XFontStruct **info) /* RETURN */
            nbytes++; /* make first string 1 byte longer, to match XListFonts */
        flist[i] = Xmalloc (nbytes);
        if (! flist[i]) {
-           if (finfo[i].properties) Xfree((char *) finfo[i].properties);
+           if (finfo[i].properties) Xfree(finfo[i].properties);
            goto badmem;
        }
        if (!i) {
@@ -177,10 +177,10 @@ XFontStruct **info)       /* RETURN */
         if (j == 0)
             flist[j]--;         /* was incremented above */
         Xfree(flist[j]);
-        if (finfo[j].properties) Xfree((char *) finfo[j].properties);
+        if (finfo[j].properties) Xfree(finfo[j].properties);
     }
-    if (flist) Xfree((char *) flist);
-    if (finfo) Xfree((char *) finfo);
+    if (flist) Xfree(flist);
+    if (finfo) Xfree(finfo);
 
   clearwire:
     /* Clear the wire. */
@@ -208,7 +208,7 @@ XFreeFontInfo (
                for (i = 1; i < actualCount; i++) {
                        Xfree (names[i]);
                }
-               Xfree((char *) names);
+               Xfree(names);
        }
        if (info) {
                for (i = 0; i < actualCount; i++) {
@@ -216,12 +216,12 @@ XFreeFontInfo (
 #ifdef USE_XF86BIGFONT
                                _XF86BigfontFreeFontMetrics(&info[i]);
 #else
-                               Xfree ((char *) info[i].per_char);
+                               Xfree (info[i].per_char);
 #endif
                        if (info[i].properties)
-                               Xfree ((char *) info[i].properties);
+                               Xfree (info[i].properties);
                        }
-               Xfree((char *) info);
+               Xfree(info);
        }
        return 1;
 }
diff --git a/src/FontNames.c b/src/FontNames.c
index 7647115..c50de2e 100644
--- a/src/FontNames.c
+++ b/src/FontNames.c
@@ -73,7 +73,7 @@ int *actualCount)     /* RETURN */
        }
 
        if ((! flist) || (! ch)) {
-           if (flist) Xfree((char *) flist);
+           if (flist) Xfree(flist);
            if (ch) Xfree(ch);
            _XEatDataWords(dpy, rep.length);
            *actualCount = 0;
@@ -116,7 +116,7 @@ XFreeFontNames(char **list)
                                Xfree (*names);
                }
                Xfree (list[0]-1);
-               Xfree ((char *)list);
+               Xfree (list);
        }
        return 1;
 }
diff --git a/src/FreeEData.c b/src/FreeEData.c
index 3a7abca..ce78467 100644
--- a/src/FreeEData.c
+++ b/src/FreeEData.c
@@ -36,9 +36,9 @@ _XFreeExtData (XExtData *extension)
        while (extension) {
                if (extension->free_private)
                    (*extension->free_private)(extension);
-               else Xfree ((char *)extension->private_data);
+               else Xfree (extension->private_data);
                temp = extension->next;
-               Xfree ((char *)extension);
+               Xfree (extension);
                extension = temp;
        }
        return 0;
diff --git a/src/FreeGC.c b/src/FreeGC.c
index ab994bc..926d507 100644
--- a/src/FreeGC.c
+++ b/src/FreeGC.c
@@ -44,7 +44,7 @@ XFreeGC (
     UnlockDisplay(dpy);
     SyncHandle();
     _XFreeExtData(gc->ext_data);
-    Xfree ((char *) gc);
+    Xfree (gc);
     return 1;
     }
 
diff --git a/src/GetFPath.c b/src/GetFPath.c
index 8f8c614..76ff732 100644
--- a/src/GetFPath.c
+++ b/src/GetFPath.c
@@ -57,7 +57,7 @@ char **XGetFontPath(
            }
 
            if ((! flist) || (! ch)) {
-               if (flist) Xfree((char *) flist);
+               if (flist) Xfree(flist);
                if (ch) Xfree(ch);
                _XEatDataWords(dpy, rep.length);
                UnlockDisplay(dpy);
@@ -93,7 +93,7 @@ XFreeFontPath (char **list)
 {
        if (list != NULL) {
                Xfree (list[0]-1);
-               Xfree ((char *)list);
+               Xfree (list);
        }
        return 1;
 }
diff --git a/src/GetHints.c b/src/GetHints.c
index 3c410d3..5cca0bc 100644
--- a/src/GetHints.c
+++ b/src/GetHints.c
@@ -75,7 +75,7 @@ Status XGetSizeHints (
 
         if ((actual_type != XA_WM_SIZE_HINTS) ||
            (nitems < OldNumPropSizeElements) || (actual_format != 32)) {
-               if (prop != NULL) Xfree ((char *)prop);
+               if (prop != NULL) Xfree (prop);
                 return(0);
                }
        hints->flags      = (prop->flags & (USPosition|USSize|PAllHints));
@@ -93,7 +93,7 @@ Status XGetSizeHints (
        hints->min_aspect.y = cvtINT32toInt (prop->minAspectY);
        hints->max_aspect.x = cvtINT32toInt (prop->maxAspectX);
        hints->max_aspect.y = cvtINT32toInt (prop->maxAspectY);
-       Xfree((char *)prop);
+       Xfree(prop);
        return(1);
 }
 
@@ -124,7 +124,7 @@ XWMHints *XGetWMHints (
 
         if ((actual_type != XA_WM_HINTS) ||
            (nitems < (NumPropWMHintsElements - 1)) || (actual_format != 32)) {
-               if (prop != NULL) Xfree ((char *)prop);
+               if (prop != NULL) Xfree (prop);
                 return(NULL);
                }
        /* static copies not allowed in library, due to reentrancy constraint*/
@@ -142,7 +142,7 @@ XWMHints *XGetWMHints (
            else
                hints->window_group = 0;
        }
-       Xfree ((char *)prop);
+       Xfree (prop);
        return(hints);
 }
 
@@ -196,7 +196,7 @@ Status XGetIconSizes (
            (nitems < NumPropIconSizeElements) ||
            (nitems % NumPropIconSizeElements != 0) ||
            (actual_format != 32)) {
-               if (prop != NULL) Xfree ((char *)prop);
+               if (prop != NULL) Xfree (prop);
                 return(0);
                }
 
@@ -204,7 +204,7 @@ Status XGetIconSizes (
 
        nitems /= NumPropIconSizeElements;
        if (! (hp = hints = Xcalloc (nitems, sizeof(XIconSize)))) {
-           if (prop) Xfree ((char *) prop);
+           if (prop) Xfree (prop);
            return 0;
        }
 
@@ -221,7 +221,7 @@ Status XGetIconSizes (
        }
        *count = nitems;
        *size_list = hints;
-       Xfree ((char *)prop);
+       Xfree (prop);
        return(1);
 }
 
@@ -239,7 +239,7 @@ Status XGetCommand (
     if (!XGetTextProperty (dpy, w, &tp, XA_WM_COMMAND)) return 0;
 
     if (tp.encoding != XA_STRING || tp.format != 8) {
-       if (tp.value) Xfree ((char *) tp.value);
+       if (tp.value) Xfree (tp.value);
        return 0;
     }
 
@@ -254,11 +254,11 @@ Status XGetCommand (
      * create a string list and return if successful
      */
     if (!XTextPropertyToStringList (&tp, &argv, &argc)) {
-       if (tp.value) Xfree ((char *) tp.value);
+       if (tp.value) Xfree (tp.value);
        return (0);
     }
 
-    if (tp.value) Xfree ((char *) tp.value);
+    if (tp.value) Xfree (tp.value);
     *argvp = argv;
     *argcp = argc;
     return 1;
@@ -317,7 +317,7 @@ XGetClassHint(
    if ( (actual_type == XA_STRING) && (actual_format == 8) ) {
        len_name = strlen((char *) data);
        if (! (classhint->res_name = Xmalloc(len_name + 1))) {
-           Xfree((char *) data);
+           Xfree(data);
            return (0);
        }
        strcpy(classhint->res_name, (char *) data);
@@ -326,7 +326,7 @@ XGetClassHint(
        if (! (classhint->res_class = Xmalloc(len_class + 1))) {
            Xfree(classhint->res_name);
            classhint->res_name = (char *) NULL;
-           Xfree((char *) data);
+           Xfree(data);
            return (0);
        }
        strcpy(classhint->res_class, (char *) (data+len_name+1));
diff --git a/src/GetNrmHint.c b/src/GetNrmHint.c
index 6f328e8..5e4143b 100644
--- a/src/GetNrmHint.c
+++ b/src/GetNrmHint.c
@@ -83,7 +83,7 @@ Status XGetWMSizeHints (
 
     if ((actual_type != XA_WM_SIZE_HINTS) ||
        (nitems < OldNumPropSizeElements) || (actual_format != 32)) {
-       if (prop != NULL) Xfree ((char *)prop);
+       if (prop != NULL) Xfree (prop);
        return False;
     }
 
@@ -112,7 +112,7 @@ Status XGetWMSizeHints (
        *supplied |= (PBaseSize | PWinGravity);
     }
     hints->flags &= (*supplied);       /* get rid of unwanted bits */
-    Xfree((char *)prop);
+    Xfree(prop);
     return True;
 }
 
diff --git a/src/GetRGBCMap.c b/src/GetRGBCMap.c
index 2f0b752..d8a1b3f 100644
--- a/src/GetRGBCMap.c
+++ b/src/GetRGBCMap.c
@@ -63,7 +63,7 @@ Status XGetRGBColormaps (
     /* if wrong type or format, or too small for us, then punt */
     if ((actual_type != XA_RGB_COLOR_MAP) || (actual_format != 32) ||
        (nitems < OldNumPropStandardColormapElements)) {
-       if (data) Xfree ((char *) data);
+       if (data) Xfree (data);
        return False;
     }
 
@@ -78,7 +78,7 @@ Status XGetRGBColormaps (
            Screen *sp = _XScreenOfWindow (dpy, w);
 
            if (!sp) {
-               if (data) Xfree ((char *) data);
+               if (data) Xfree (data);
                return False;
            }
            def_visual = sp->root_visual->visualid;
@@ -90,7 +90,7 @@ Status XGetRGBColormaps (
        ncmaps = (nitems / NumPropStandardColormapElements);
        if ((((unsigned long) ncmaps) * NumPropStandardColormapElements) !=
            nitems) {
-           if (data) Xfree ((char *) data);
+           if (data) Xfree (data);
            return False;
        }
     }
@@ -101,7 +101,7 @@ Status XGetRGBColormaps (
      */
     cmaps = Xmalloc (ncmaps * sizeof (XStandardColormap));
     if (!cmaps) {
-       if (data) Xfree ((char *) data);
+       if (data) Xfree (data);
        return False;
     }
 
@@ -126,7 +126,7 @@ Status XGetRGBColormaps (
            map->killid     = (old_style ? None : prop->killid);
        }
     }
-    Xfree ((char *) data);
+    Xfree (data);
     *stdcmap = cmaps;
     *count = ncmaps;
     return True;
diff --git a/src/GetStCmap.c b/src/GetStCmap.c
index 82fb213..ac5b0fa 100644
--- a/src/GetStCmap.c
+++ b/src/GetStCmap.c
@@ -81,7 +81,7 @@ Status XGetStandardColormap (
            int i;
 
            if (!sp) {
-               if (stdcmaps) Xfree ((char *) stdcmaps);
+               if (stdcmaps) Xfree (stdcmaps);
                return False;
            }
            vid = sp->root_visual->visualid;
@@ -91,7 +91,7 @@ Status XGetStandardColormap (
            }
 
            if (i == nstdcmaps) {       /* not found */
-               Xfree ((char *) stdcmaps);
+               Xfree (stdcmaps);
                return False;
            }
            use = &stdcmaps[i];
@@ -111,7 +111,7 @@ Status XGetStandardColormap (
        cmap->blue_mult  = use->blue_mult;
        cmap->base_pixel = use->base_pixel;
 
-       Xfree ((char *) stdcmaps);      /* don't need alloced memory */
+       Xfree (stdcmaps);       /* don't need alloced memory */
     }
     return stat;
 }
diff --git a/src/GetWMCMapW.c b/src/GetWMCMapW.c
index 5d54cc1..27f1e23 100644
--- a/src/GetWMCMapW.c
+++ b/src/GetWMCMapW.c
@@ -77,7 +77,7 @@ Status XGetWMColormapWindows (
       return False;
 
     if (actual_type != XA_WINDOW || actual_format != 32) {
-       if (data) Xfree ((char *) data);
+       if (data) Xfree (data);
        return False;
     }
 
diff --git a/src/GetWMProto.c b/src/GetWMProto.c
index d8f8bda..4e9f12c 100644
--- a/src/GetWMProto.c
+++ b/src/GetWMProto.c
@@ -77,7 +77,7 @@ Status XGetWMProtocols (
       return False;
 
     if (actual_type != XA_ATOM || actual_format != 32) {
-       if (data) Xfree ((char *) data);
+       if (data) Xfree (data);
        return False;
     }
 
diff --git a/src/ImUtil.c b/src/ImUtil.c
index 240a261..4fc060c 100644
--- a/src/ImUtil.c
+++ b/src/ImUtil.c
@@ -434,9 +434,9 @@ Status XInitImage (XImage *image)
 
 static int _XDestroyImage (XImage *ximage)
 {
-       if (ximage->data != NULL) Xfree((char *)ximage->data);
-       if (ximage->obdata != NULL) Xfree((char *)ximage->obdata);
-       Xfree((char *)ximage);
+       if (ximage->data != NULL) Xfree(ximage->data);
+       if (ximage->obdata != NULL) Xfree(ximage->obdata);
+       Xfree(ximage);
        return 1;
 }
 
@@ -869,7 +869,7 @@ static XImage *_XSubImage (
        dsize = subimage->bytes_per_line * height;
        if (subimage->format == XYPixmap) dsize = dsize * subimage->depth;
        if (((data = Xcalloc (1, dsize)) == NULL) && (dsize > 0)) {
-           Xfree((char *) subimage);
+           Xfree(subimage);
            return (XImage *) NULL;
        }
        subimage->data = data;
diff --git a/src/InitExt.c b/src/InitExt.c
index 75991bd..0ff3732 100644
--- a/src/InitExt.c
+++ b/src/InitExt.c
@@ -51,7 +51,7 @@ XExtCodes *XInitExtension (
        LockDisplay (dpy);
        if (! (ext = Xcalloc (1, sizeof (_XExtension))) ||
            ! (ext->name = strdup(name))) {
-           if (ext) Xfree((char *) ext);
+           if (ext) Xfree(ext);
            UnlockDisplay(dpy);
            return (XExtCodes *) NULL;
        }
diff --git a/src/IntAtom.c b/src/IntAtom.c
index 25466ca..3042b65 100644
--- a/src/IntAtom.c
+++ b/src/IntAtom.c
@@ -47,9 +47,9 @@ _XFreeAtomTable(Display *dpy)
        table = dpy->atoms->table;
        for (i = TABLESIZE; --i >= 0; ) {
            if ((e = *table++) && (e != RESERVED))
-               Xfree((char *)e);
+               Xfree(e);
        }
-       Xfree((char *)dpy->atoms);
+       Xfree(dpy->atoms);
     }
 }
 
@@ -153,7 +153,7 @@ _XUpdateAtomCache(
        e->atom = atom;
        strcpy(EntryName(e), name);
        if ((oe = dpy->atoms->table[idx]) && (oe != RESERVED))
-           Xfree((char *)oe);
+           Xfree(oe);
        dpy->atoms->table[idx] = e;
     }
 }
diff --git a/src/KeyBind.c b/src/KeyBind.c
index 2110772..a49de3d 100644
--- a/src/KeyBind.c
+++ b/src/KeyBind.c
@@ -239,7 +239,7 @@ XRefreshKeyboardMapping(register XMappingEvent *event)
         */
        LockDisplay(event->display);
        if (event->display->keysyms) {
-            Xfree ((char *)event->display->keysyms);
+            Xfree (event->display->keysyms);
             event->display->keysyms = NULL;
        }
        UnlockDisplay(event->display);
@@ -277,7 +277,7 @@ _XKeyInitialize(
 
        LockDisplay(dpy);
        if (dpy->keysyms)
-           Xfree ((char *)dpy->keysyms);
+           Xfree (dpy->keysyms);
        dpy->keysyms = keysyms;
        dpy->keysyms_per_keycode = per;
        if (dpy->modifiermap)
@@ -974,8 +974,8 @@ _XFreeKeyBindings(
     for (p = dpy->key_bindings; p; p = np) {
        np = p->next;
        Xfree(p->string);
-       Xfree((char *)p->modifiers);
-       Xfree((char *)p);
+       Xfree(p->modifiers);
+       Xfree(p);
     }
 }
 
@@ -1002,8 +1002,8 @@ XRebindKeysym (
        ((! (p->modifiers = Xmalloc(nb))) && (nb > 0))) {
        if (p) {
            if (p->string) Xfree(p->string);
-           if (p->modifiers) Xfree((char *) p->modifiers);
-           Xfree((char *) p);
+           if (p->modifiers) Xfree(p->modifiers);
+           Xfree(p);
        }
        UnlockDisplay(dpy);
        return 0;
diff --git a/src/ListExt.c b/src/ListExt.c
index 59599d1..f40924d 100644
--- a/src/ListExt.c
+++ b/src/ListExt.c
@@ -62,8 +62,8 @@ char **XListExtensions(
            }
 
            if ((!list) || (!ch)) {
-               if (list) Xfree((char *) list);
-               if (ch)   Xfree((char *) ch);
+               if (list) Xfree(list);
+               if (ch)   Xfree(ch);
                _XEatDataWords(dpy, rep.length);
                UnlockDisplay(dpy);
                SyncHandle();
@@ -99,7 +99,7 @@ XFreeExtensionList (char **list)
 {
        if (list != NULL) {
            Xfree (list[0]-1);
-           Xfree ((char *)list);
+           Xfree (list);
        }
        return 1;
 }
diff --git a/src/ModMap.c b/src/ModMap.c
index 2fabc56..78d635b 100644
--- a/src/ModMap.c
+++ b/src/ModMap.c
@@ -50,7 +50,7 @@ XGetModifierMapping(register Display *dpy)
     } else
        res = NULL;
     if ((! res) || (! res->modifiermap)) {
-       if (res) Xfree((char *) res);
+       if (res) Xfree(res);
        res = (XModifierKeymap *) NULL;
        _XEatDataWords(dpy, rep.length);
     } else {
@@ -102,7 +102,7 @@ XNewModifiermap(int keyspermodifier)
                            Xmalloc(8 * keyspermodifier)
                            : (KeyCode *) NULL);
        if (keyspermodifier && (res->modifiermap == NULL)) {
-           Xfree((char *) res);
+           Xfree(res);
            return (XModifierKeymap *) NULL;
        }
     }
@@ -115,8 +115,8 @@ XFreeModifiermap(XModifierKeymap *map)
 {
     if (map) {
        if (map->modifiermap)
-           Xfree((char *) map->modifiermap);
-       Xfree((char *) map);
+           Xfree(map->modifiermap);
+       Xfree(map);
     }
     return 1;
 }
diff --git a/src/OpenDis.c b/src/OpenDis.c
index fc67d1a..3793814 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -592,7 +592,7 @@ void _XFreeDisplayStructure(Display *dpy)
            dpy->ext_procs = ext->next;
            if (ext->name)
                Xfree (ext->name);
-           Xfree ((char *)ext);
+           Xfree (ext);
        }
        if (dpy->im_filters)
           (*dpy->free_funcs->im_filters)(dpy);
@@ -634,17 +634,17 @@ void _XFreeDisplayStructure(Display *dpy)
 
                           for (k = 0; k < dp->nvisuals; k++)
                             _XFreeExtData (dp->visuals[k].ext_data);
-                          Xfree ((char *) dp->visuals);
+                          Xfree (dp->visuals);
                           }
                        }
 
-                  Xfree ((char *) sp->depths);
+                  Xfree (sp->depths);
                   }
 
                _XFreeExtData (sp->ext_data);
                }
 
-           Xfree ((char *)dpy->screens);
+           Xfree (dpy->screens);
            }
 
        if (dpy->pixmap_format) {
@@ -652,7 +652,7 @@ void _XFreeDisplayStructure(Display *dpy)
 
            for (i = 0; i < dpy->nformats; i++)
              _XFreeExtData (dpy->pixmap_format[i].ext_data);
-            Xfree ((char *)dpy->pixmap_format);
+            Xfree (dpy->pixmap_format);
            }
 
        free(dpy->display_name);
@@ -662,15 +662,15 @@ void _XFreeDisplayStructure(Display *dpy)
         if (dpy->buffer)
           Xfree (dpy->buffer);
        if (dpy->keysyms)
-          Xfree ((char *) dpy->keysyms);
+          Xfree (dpy->keysyms);
        if (dpy->xdefaults)
           Xfree (dpy->xdefaults);
        if (dpy->error_vec)
-           Xfree ((char *)dpy->error_vec);
+           Xfree (dpy->error_vec);
 
        _XFreeExtData (dpy->ext_data);
        if (dpy->free_funcs)
-           Xfree ((char *)dpy->free_funcs);
+           Xfree (dpy->free_funcs);
        if (dpy->scratch_buffer)
            Xfree (dpy->scratch_buffer);
        FreeDisplayLock(dpy);
@@ -680,7 +680,7 @@ void _XFreeDisplayStructure(Display *dpy)
 
            while (qelt) {
                register _XQEvent *qnxt = qelt->next;
-               Xfree ((char *) qelt);
+               Xfree (qelt);
                qelt = qnxt;
            }
        }
@@ -701,7 +701,7 @@ void _XFreeDisplayStructure(Display *dpy)
 
        _XFreeX11XCBStructure(dpy);
 
-       Xfree ((char *)dpy);
+       Xfree (dpy);
 }
 
 /* OutOfMemory is called if malloc fails.  XOpenDisplay returns NULL
diff --git a/src/PolyReg.c b/src/PolyReg.c
index 6d02773..7266d3b 100644
--- a/src/PolyReg.c
+++ b/src/PolyReg.c
@@ -378,7 +378,7 @@ FreeStorage(
     while (pSLLBlock)
     {
         tmpSLLBlock = pSLLBlock->next;
-        Xfree((char *)pSLLBlock);
+        Xfree(pSLLBlock);
         pSLLBlock = tmpSLLBlock;
     }
 }
@@ -627,9 +627,9 @@ XPolygonRegion(
     (void) PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region);
     for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) {
        tmpPtBlock = curPtBlock->next;
-       Xfree((char *)curPtBlock);
+       Xfree(curPtBlock);
        curPtBlock = tmpPtBlock;
     }
-    Xfree((char *)pETEs);
+    Xfree(pETEs);
     return(region);
 }
diff --git a/src/PutImage.c b/src/PutImage.c
index 934fabe..e6ac9a2 100644
--- a/src/PutImage.c
+++ b/src/PutImage.c
@@ -794,7 +794,7 @@ SendZImage(
         ((req_yoffset + req->height) < (unsigned)image->height))) {
        Data(dpy, (char *)src, length);
        if (shifted_src)
-           Xfree((char *)shifted_src);
+           Xfree(shifted_src);
        return;
     }
 
@@ -804,7 +804,7 @@ SendZImage(
     else
        if ((dest = (unsigned char *)
             _XAllocScratch(dpy, length)) == NULL) {
-           if (shifted_src) Xfree((char *) shifted_src);
+           if (shifted_src) Xfree(shifted_src);
            UnGetReq(PutImage);
            return;
        }
@@ -832,7 +832,7 @@ SendZImage(
        _XSend(dpy, (char *)dest, length);
 
     if (shifted_src)
-        Xfree((char *)shifted_src);
+        Xfree(shifted_src);
 }
 
 static void
diff --git a/src/QuColors.c b/src/QuColors.c
index 13a63eb..0b9bc50 100644
--- a/src/QuColors.c
+++ b/src/QuColors.c
@@ -64,7 +64,7 @@ _XQueryColors(
                def->blue = rgb->blue;
                def->flags = DoRed | DoGreen | DoBlue;
            }
-           Xfree((char *)color);
+           Xfree(color);
        }
        else
            _XEatDataWords(dpy, rep.length);
diff --git a/src/Quarks.c b/src/Quarks.c
index 60fe127..cfdfe07 100644
--- a/src/Quarks.c
+++ b/src/Quarks.c
@@ -230,7 +230,7 @@ ExpandQuarkTable(void)
        }
     }
     if (oldmask)
-       Xfree((char *)oldentries);
+       Xfree(oldentries);
     return True;
 }
 
diff --git a/src/RdBitF.c b/src/RdBitF.c
index 727204f..31bf583 100644
--- a/src/RdBitF.c
+++ b/src/RdBitF.c
@@ -137,7 +137,7 @@ XReadBitmapFileData (
 
     /* error cleanup and return macro  */
 #define        RETURN(code) \
-{ if (bits) Xfree ((char *)bits); fclose (fstream); return code; }
+{ if (bits) Xfree (bits); fclose (fstream); return code; }
 
     while (fgets(line, MAX_SIZE, fstream)) {
        if (strlen(line) == MAX_SIZE-1)
@@ -254,7 +254,7 @@ XReadBitmapFile (
     if (res != BitmapSuccess)
        return res;
     *pixmap = XCreateBitmapFromData(display, d, (char *)data, *width, *height);
-    Xfree((char *)data);
+    Xfree(data);
     if (*pixmap == None)
        return (BitmapNoMemory);
     return (BitmapSuccess);
diff --git a/src/Region.c b/src/Region.c
index fcf53e6..d5dd556 100644
--- a/src/Region.c
+++ b/src/Region.c
@@ -142,7 +142,7 @@ XCreateRegion(void)
     if (! (temp = Xmalloc(sizeof( REGION ))))
        return (Region) NULL;
     if (! (temp->rects = Xmalloc(sizeof( BOX )))) {
-       Xfree((char *) temp);
+       Xfree(temp);
        return (Region) NULL;
     }
     temp->numRects = 0;
@@ -994,11 +994,11 @@ miRegionOp(
             * the region is empty
             */
            newReg->size = 1;
-           Xfree((char *) newReg->rects);
+           Xfree(newReg->rects);
            newReg->rects = Xmalloc(sizeof(BoxRec));
        }
     }
-    Xfree ((char *) oldRects);
+    Xfree (oldRects);
     return;
 }
 
diff --git a/src/RegstFlt.c b/src/RegstFlt.c
index 5a1faa7..077ea42 100644
--- a/src/RegstFlt.c
+++ b/src/RegstFlt.c
@@ -66,7 +66,7 @@ _XFreeIMFilters(
 
     while ((fl = display->im_filters)) {
         display->im_filters = fl->next;
-        Xfree((char *)fl);
+        Xfree(fl);
     }
 }
 
@@ -148,7 +148,7 @@ _XUnregisterFilter(
        if (fl->window == window &&
            fl->filter == filter && fl->client_data == client_data) {
            *prev = fl->next;
-           Xfree((char *)fl);
+           Xfree(fl);
        } else
            prev = &fl->next;
     }
diff --git a/src/SetFPath.c b/src/SetFPath.c
index b1afd82..60aaef0 100644
--- a/src/SetFPath.c
+++ b/src/SetFPath.c
@@ -65,7 +65,7 @@ XSetFontPath (
                        p += length + 1;
                }
                Data (dpy, tmp, nbytes);
-               Xfree ((char *) tmp);
+               Xfree (tmp);
                retCode = 1;
        }
        else
diff --git a/src/SetHints.c b/src/SetHints.c
index 0ae0764..5f0a4d4 100644
--- a/src/SetHints.c
+++ b/src/SetHints.c
@@ -198,7 +198,7 @@ XSetIconSizes (
            XChangeProperty (dpy, w, XA_WM_ICON_SIZE, XA_WM_ICON_SIZE, 32,
                             PropModeReplace, (unsigned char *) prop,
                             count * NumPropIconSizeElements);
-           Xfree ((char *)prop);
+           Xfree (prop);
        }
        return 1;
 }
diff --git a/src/SetRGBCMap.c b/src/SetRGBCMap.c
index d2cbb5b..a52de26 100644
--- a/src/SetRGBCMap.c
+++ b/src/SetRGBCMap.c
@@ -95,6 +95,6 @@ void XSetRGBColormaps (
        XChangeProperty (dpy, w, property, XA_RGB_COLOR_MAP, 32,
                         PropModeReplace, (unsigned char *) data,
                         (int) (count * NumPropStandardColormapElements));
-       Xfree ((char *) data);
+       Xfree (data);
     }
 }
diff --git a/src/StBytes.c b/src/StBytes.c
index 07ee441..ec6c2e2 100644
--- a/src/StBytes.c
+++ b/src/StBytes.c
@@ -74,7 +74,7 @@ char *XFetchBuffer (
        *nbytes = nitems;
        return((char *)data);
        }
-    if ((char *) data != NULL) Xfree ((char *)data);
+    if ((char *) data != NULL) Xfree (data);
     return(NULL);
 }
 
diff --git a/src/TextToStr.c b/src/TextToStr.c
index 36d9f07..de9897a 100644
--- a/src/TextToStr.c
+++ b/src/TextToStr.c
@@ -77,7 +77,7 @@ Status XTextPropertyToStringList (
 
     start = Xmalloc ((datalen + 1) * sizeof (char));   /* for <NUL> */
     if (!start) {
-       Xfree ((char *) list);
+       Xfree (list);
        return False;
     }
 
@@ -111,7 +111,7 @@ void XFreeStringList (char **list)
 {
     if (list) {
        if (list[0]) Xfree (list[0]);
-       Xfree ((char *) list);
+       Xfree (list);
        list = NULL;
     }
 }
diff --git a/src/VisUtil.c b/src/VisUtil.c
index aa67992..17ca363 100644
--- a/src/VisUtil.c
+++ b/src/VisUtil.c
@@ -133,7 +133,7 @@ XVisualInfo *XGetVisualInfo(
                   total += 10;
                   if (! (vip_base = Xrealloc(vip_base,
                                             sizeof(XVisualInfo) * total))) {
-                     Xfree((char *) old_vip_base);
+                     Xfree(old_vip_base);
                      UnlockDisplay(dpy);
                      return (XVisualInfo *) NULL;
                  }
@@ -170,7 +170,7 @@ XVisualInfo *XGetVisualInfo(
       return vip_base;
     }
 
-  Xfree((char *) vip_base);
+  Xfree(vip_base);
   *nitems = 0;
   return NULL;
 }
diff --git a/src/Xrm.c b/src/Xrm.c
index d8272ee..36b71d6 100644
--- a/src/Xrm.c
+++ b/src/Xrm.c
@@ -531,7 +531,7 @@ static void MoveValues(
            fentry->next = tentry;
        }
     }
-    Xfree((char *)ftable->buckets);
+    Xfree(ftable->buckets);
 }
 
 /* move all tables from ftable to ttable, and free ftable.
@@ -558,7 +558,7 @@ static void MoveTables(
            fentry->next = tentry;
        }
     }
-    Xfree((char *)ftable);
+    Xfree(ftable);
 }
 
 /* grow the table, based on current number of entries */
@@ -649,7 +649,7 @@ static void MergeValues(
                    fentry = *prev;
                    *prev = tentry->next;
                    /* free the overridden entry */
-                   Xfree((char *)tentry);
+                   Xfree(tentry);
                    /* get next tentry */
                    tentry = *prev;
                } else {
@@ -658,7 +658,7 @@ static void MergeValues(
                    tentry = fentry; /* use as a temp var */
                    fentry = fentry->next;
                    /* free the overpowered entry */
-                   Xfree((char *)tentry);
+                   Xfree(tentry);
                    /* get next tentry */
                    tentry = *prev;
                }
@@ -676,8 +676,8 @@ static void MergeValues(
            }
        }
     }
-    Xfree((char *)ftable->buckets);
-    Xfree((char *)ftable);
+    Xfree(ftable->buckets);
+    Xfree(ftable);
     /* resize if necessary, now that we're all done */
     GROW(pprev);
 }
@@ -751,7 +751,7 @@ static void MergeTables(
            }
        }
     }
-    Xfree((char *)ftable);
+    Xfree(ftable);
     /* resize if necessary, now that we're all done */
     GROW(pprev);
 }
@@ -801,7 +801,7 @@ void XrmCombineDatabase(
        (from->methods->destroy)(from->mbstate);
        _XUnlockMutex(&from->linfo);
        _XFreeMutex(&from->linfo);
-       Xfree((char *)from);
+       Xfree(from);
        _XUnlockMutex(&(*into)->linfo);
     }
 }
@@ -929,7 +929,7 @@ static void PutEntry(
                }
                /* splice out and free old entry */
                *vprev = entry->next;
-               Xfree((char *)entry);
+               Xfree(entry);
                (*pprev)->entries--;
            }
            /* this is where to insert */
@@ -2605,11 +2605,11 @@ static void DestroyLTable(
     for (i = table->table.mask; i >= 0; i--, buckets++) {
        for (next = *buckets; (entry = next); ) {
            next = entry->next;
-           Xfree((char *)entry);
+           Xfree(entry);
        }
     }
-    Xfree((char *)table->buckets);
-    Xfree((char *)table);
+    Xfree(table->buckets);
+    Xfree(table);
 }
 
 /* destroy all contained tables, plus table itself */
@@ -2630,7 +2630,7 @@ static void DestroyNTable(
                DestroyNTable(entry);
        }
     }
-    Xfree((char *)table);
+    Xfree(table);
 }
 
 const char *
@@ -2661,6 +2661,6 @@ void XrmDestroyDatabase(
        _XUnlockMutex(&db->linfo);
        _XFreeMutex(&db->linfo);
        (*db->methods->destroy)(db->mbstate);
-       Xfree((char *)db);
+       Xfree(db);
     }
 }
diff --git a/src/locking.c b/src/locking.c
index 7c09c44..9f4fe06 100644
--- a/src/locking.c
+++ b/src/locking.c
@@ -312,8 +312,8 @@ static void _XPopReader(
            dpy->lock->num_free_cvls++;
        } else {
            xcondition_clear(front->cv);
-           Xfree((char *)front->cv);
-           Xfree((char *)front);
+           Xfree(front->cv);
+           Xfree(front);
        }
     }
 
@@ -419,14 +419,14 @@ static void _XFreeDisplayLock(
        while ((cvl = dpy->lock->free_cvls)) {
            dpy->lock->free_cvls = cvl->next;
            xcondition_clear(cvl->cv);
-           Xfree((char *)cvl->cv);
-           Xfree((char *)cvl);
+           Xfree(cvl->cv);
+           Xfree(cvl);
        }
-       Xfree((char *)dpy->lock);
+       Xfree(dpy->lock);
        dpy->lock = NULL;
     }
     if (dpy->lock_fns != NULL) {
-       Xfree((char *)dpy->lock_fns);
+       Xfree(dpy->lock_fns);
        dpy->lock_fns = NULL;
     }
 }
diff --git a/src/xcms/CvCols.c b/src/xcms/CvCols.c
index f543f27..87d4931 100644
--- a/src/xcms/CvCols.c
+++ b/src/xcms/CvCols.c
@@ -987,13 +987,13 @@ XcmsConvertColors(
               nColors * sizeof(XcmsColor));
     }
     if (nColors > 1) {
-       Xfree((char *)pColors_tmp);
+       Xfree(pColors_tmp);
     }
     return(retval);
 
 Failure:
     if (nColors > 1) {
-       Xfree((char *)pColors_tmp);
+       Xfree(pColors_tmp);
     }
     return(XcmsFailure);
 }
diff --git a/src/xcms/LRGB.c b/src/xcms/LRGB.c
index 5ecb7d1..461d07d 100644
--- a/src/xcms/LRGB.c
+++ b/src/xcms/LRGB.c
@@ -511,7 +511,7 @@ LINEAR_RGB_InitSCCData(
            *pValue++ = (long)_XcmsGetElement(format_return, &pChar,
                    &nitems) / (XcmsFloat)XDCCC_NUMBER;
        }
-       Xfree ((char *)property_return);
+       Xfree (property_return);
        pPerScrnInfo->screenWhitePt.spec.CIEXYZ.X =
                pScreenData->RGBtoXYZmatrix[0][0] +
                pScreenData->RGBtoXYZmatrix[0][1] +
@@ -662,7 +662,7 @@ LINEAR_RGB_InitSCCData(
            /* Create, initialize, and add map */
            if (!(pNewMap = (XcmsIntensityMap *)
                              Xcalloc (1, sizeof(XcmsIntensityMap)))) {
-               Xfree((char *)pScreenData);
+               Xfree(pScreenData);
                goto Free_property_return;
            }
            pNewMap->visualID = visualID;
@@ -782,7 +782,7 @@ LINEAR_RGB_InitSCCData(
 #endif /* ALLDEBUG */
     }
 
-    Xfree ((char *)property_return);
+    Xfree (property_return);
 
     /* Free the old memory and use the new structure created. */
     LINEAR_RGB_FreeSCCData(pPerScrnInfo->screenData);
@@ -796,28 +796,28 @@ LINEAR_RGB_InitSCCData(
     return(XcmsSuccess);
 
 FreeBlueTblElements:
-    Xfree((char *)pScreenData->pBlueTbl->pBase);
+    Xfree(pScreenData->pBlueTbl->pBase);
 
 FreeBlueTbl:
-    Xfree((char *)pScreenData->pBlueTbl);
+    Xfree(pScreenData->pBlueTbl);
 
 FreeGreenTblElements:
-    Xfree((char *)pScreenData->pGreenTbl->pBase);
+    Xfree(pScreenData->pGreenTbl->pBase);
 
 FreeGreenTbl:
-    Xfree((char *)pScreenData->pGreenTbl);
+    Xfree(pScreenData->pGreenTbl);
 
 FreeRedTblElements:
-    Xfree((char *)pScreenData->pRedTbl->pBase);
+    Xfree(pScreenData->pRedTbl->pBase);
 
 FreeRedTbl:
-    Xfree((char *)pScreenData->pRedTbl);
+    Xfree(pScreenData->pRedTbl);
 
 Free_property_return:
-    Xfree ((char *)property_return);
+    Xfree (property_return);
 
 FreeSCCData:
-    Xfree((char *)pScreenDefaultData);
+    Xfree(pScreenDefaultData);
     pPerScrnInfo->state = XcmsInitNone;
     return(XcmsFailure);
 }
@@ -849,30 +849,30 @@ LINEAR_RGB_FreeSCCData(
                if (pScreenData->pRedTbl->pBase !=
                    pScreenData->pGreenTbl->pBase) {
                    if (pScreenData->pGreenTbl->pBase) {
-                       Xfree ((char *)pScreenData->pGreenTbl->pBase);
+                       Xfree (pScreenData->pGreenTbl->pBase);
                    }
                }
                if (pScreenData->pGreenTbl != pScreenData->pRedTbl) {
-                   Xfree ((char *)pScreenData->pGreenTbl);
+                   Xfree (pScreenData->pGreenTbl);
                }
            }
            if (pScreenData->pBlueTbl) {
                if (pScreenData->pRedTbl->pBase !=
                    pScreenData->pBlueTbl->pBase) {
                    if (pScreenData->pBlueTbl->pBase) {
-                       Xfree ((char *)pScreenData->pBlueTbl->pBase);
+                       Xfree (pScreenData->pBlueTbl->pBase);
                    }
                }
                if (pScreenData->pBlueTbl != pScreenData->pRedTbl) {
-                   Xfree ((char *)pScreenData->pBlueTbl);
+                   Xfree (pScreenData->pBlueTbl);
                }
            }
            if (pScreenData->pRedTbl->pBase) {
-               Xfree ((char *)pScreenData->pRedTbl->pBase);
+               Xfree (pScreenData->pRedTbl->pBase);
            }
-           Xfree ((char *)pScreenData->pRedTbl);
+           Xfree (pScreenData->pRedTbl);
        }
-       Xfree ((char *)pScreenData);
+       Xfree (pScreenData);
     }
 }
 
diff --git a/src/xcms/SetGetCols.c b/src/xcms/SetGetCols.c
index fc37085..83fa4c2 100644
--- a/src/xcms/SetGetCols.c
+++ b/src/xcms/SetGetCols.c
@@ -251,7 +251,7 @@ _XcmsSetGetColors(
      */
     if ((retval = XcmsConvertColors(ccc, pColors_in_out, nColors, 
XcmsRGBFormat,
            pCompressed)) == XcmsFailure) {
-        Xfree((char *)pXColors_in_out);
+        Xfree(pXColors_in_out);
        return(XcmsFailure);
     }
 
@@ -268,12 +268,12 @@ Query:
        /* Note: XQueryColors and XStoreColors do not return any Status */
        (*xColorProc)(ccc->dpy, cmap, pXColors_in_out, nColors);
     } else {
-       Xfree((char *)pXColors_in_out);
+       Xfree(pXColors_in_out);
        return(XcmsFailure);
     }
 
     if (*xColorProc == XStoreColors) {
-       Xfree((char *)pXColors_in_out);
+       Xfree(pXColors_in_out);
        return(retval);
     }
 
@@ -281,7 +281,7 @@ Query:
      * Now, convert the returned XColor (i.e., rgb) to XcmsColor structures
      */
     _XColor_to_XcmsRGB(ccc, pXColors_in_out, pColors_in_out, nColors);
-    Xfree((char *)pXColors_in_out);
+    Xfree(pXColors_in_out);
 
     /*
      * Then, convert XcmsColor structures to the original specification
diff --git a/src/xcms/StCols.c b/src/xcms/StCols.c
index 95fd6ee..42a29cd 100644
--- a/src/xcms/StCols.c
+++ b/src/xcms/StCols.c
@@ -102,7 +102,7 @@ XcmsStoreColors(
      * Free copies as needed.
      */
     if (nColors > 1) {
-       Xfree((char *)pColors_tmp);
+       Xfree(pColors_tmp);
     }
 
     /*
diff --git a/src/xcms/cmsCmap.c b/src/xcms/cmsCmap.c
index 8db6ffe..c5401c0 100644
--- a/src/xcms/cmsCmap.c
+++ b/src/xcms/cmsCmap.c
@@ -191,7 +191,7 @@ CmapRecForColormap(
            SyncHandle();
        } while (async_state.error_count > 0 && ++j < nVisualsMatched);
 
-       Xfree((char *)visualList);
+       Xfree(visualList);
 
        /*
         * if successful
@@ -352,7 +352,7 @@ _XcmsDeleteCmapRec(
            XcmsFreeCCC(pRec->ccc);
        }
        *pPrevPtr = pRec->pNext;
-       Xfree((char *)pRec);
+       Xfree(pRec);
     }
 }
 
@@ -387,7 +387,7 @@ _XcmsFreeClientCmaps(
            XcmsFreeCCC(pRecFree->ccc);
        }
        /* Now free the XcmsCmapRec structure */
-       Xfree((char *)pRecFree);
+       Xfree(pRecFree);
     }
     dpy->cms.clientCmaps = (XPointer)NULL;
 }
diff --git a/src/xlibi18n/ICWrap.c b/src/xlibi18n/ICWrap.c
index dadc8f5..2a1d0d6 100644
--- a/src/xlibi18n/ICWrap.c
+++ b/src/xlibi18n/ICWrap.c
@@ -186,7 +186,7 @@ XSetIMValues(XIM im, ...)
     va_end(var);
 
     ret = (*im->methods->set_values) (im, args);
-    if (args) Xfree((char *)args);
+    if (args) Xfree(args);
     return ret;
 }
 
@@ -213,7 +213,7 @@ XGetIMValues(XIM im, ...)
     va_end(var);
 
     ret = (*im->methods->get_values) (im, args);
-    if (args) Xfree((char *)args);
+    if (args) Xfree(args);
     return ret;
 }
 
@@ -245,7 +245,7 @@ XCreateIC(XIM im, ...)
     va_end(var);
 
     ic = (XIC) (*im->methods->create_ic) (im, args);
-    if (args) Xfree((char *)args);
+    if (args) Xfree(args);
     if (ic) {
        ic->core.next = im->core.ic_chain;
        im->core.ic_chain = ic;
@@ -271,7 +271,7 @@ XDestroyIC(XIC ic)
            }
        }
     }
-    Xfree ((char *) ic);
+    Xfree (ic);
 }
 
 char *
@@ -300,7 +300,7 @@ XGetICValues(XIC ic, ...)
     va_end(var);
 
     ret = (*ic->methods->get_values) (ic, args);
-    if (args) Xfree((char *)args);
+    if (args) Xfree(args);
     return ret;
 }
 
@@ -330,7 +330,7 @@ XSetICValues(XIC ic, ...)
     va_end(var);
 
     ret = (*ic->methods->set_values) (ic, args);
-    if (args) Xfree((char *)args);
+    if (args) Xfree(args);
     return ret;
 }
 
diff --git a/src/xlibi18n/IMWrap.c b/src/xlibi18n/IMWrap.c
index 0f6ed55..a7c1d98 100644
--- a/src/xlibi18n/IMWrap.c
+++ b/src/xlibi18n/IMWrap.c
@@ -134,7 +134,7 @@ XCloseIM(XIM im)
     s = (im->methods->close) (im);
     for (ic = im->core.ic_chain; ic; ic = ic->core.next)
        ic->core.im = (XIM)NULL;
-    Xfree ((char *) im);
+    Xfree (im);
     _XCloseLC (lcd);
     return (s);
 }
diff --git a/src/xlibi18n/lcCT.c b/src/xlibi18n/lcCT.c
index b92ceff..b161300 100644
--- a/src/xlibi18n/lcCT.c
+++ b/src/xlibi18n/lcCT.c
@@ -1187,7 +1187,7 @@ close_converter(
     XlcConv conv)
 {
     /* conv->state is allocated together with conv, free both at once.  */
-    Xfree((char *) conv);
+    Xfree(conv);
 }
 
 
diff --git a/src/xlibi18n/lcCharSet.c b/src/xlibi18n/lcCharSet.c
index 57f13d5..0adf0ad 100644
--- a/src/xlibi18n/lcCharSet.c
+++ b/src/xlibi18n/lcCharSet.c
@@ -186,7 +186,7 @@ _XlcCreateDefaultCharSet(
     /* Fill in name and xrm_name.  */
     tmp = Xmalloc(name_len + 1 + ct_sequence_len + 1);
     if (tmp == NULL) {
-       Xfree((char *) charset);
+       Xfree(charset);
        return (XlcCharSet) NULL;
     }
     memcpy(tmp, name, name_len+1);
@@ -199,7 +199,7 @@ _XlcCreateDefaultCharSet(
         char *encoding_tmp = Xmalloc(length + 1);
         if (encoding_tmp == NULL) {
             Xfree((char *) charset->name);
-            Xfree((char *) charset);
+            Xfree(charset);
             return (XlcCharSet) NULL;
         }
         memcpy(encoding_tmp, charset->name, length);
diff --git a/src/xlibi18n/lcConv.c b/src/xlibi18n/lcConv.c
index 0a8a677..7d9a473 100644
--- a/src/xlibi18n/lcConv.c
+++ b/src/xlibi18n/lcConv.c
@@ -199,10 +199,10 @@ close_indirect_converter(
        if (conv->to_conv)
            close_converter(conv->to_conv);
 
-       Xfree((char *) conv);
+       Xfree(conv);
     }
 
-    Xfree((char *) lc_conv);
+    Xfree(lc_conv);
 }
 
 static void
diff --git a/src/xlibi18n/lcDB.c b/src/xlibi18n/lcDB.c
index b8dd5ed..fda3ae7 100644
--- a/src/xlibi18n/lcDB.c
+++ b/src/xlibi18n/lcDB.c
@@ -196,7 +196,7 @@ clear_parse_info (void)
        if (*parse_info.value) {
            Xfree(*parse_info.value);
        }
-       Xfree((char *)parse_info.value);
+       Xfree(parse_info.value);
     }
     ptr = parse_info.buf;
     size = parse_info.bufMaxSize;
@@ -1033,10 +1033,10 @@ DestroyDatabase(
            if (*p->value != NULL) {
                Xfree(*p->value);
            }
-           Xfree((char *)p->value);
+           Xfree(p->value);
        }
        db = p->next;
-       Xfree((char *)p);
+       Xfree(p);
        p = db;
     }
 }
@@ -1249,7 +1249,7 @@ _XlcDestroyLocaleDataBase(
        if (p->lc_db == lc_db) {
            if ((-- p->ref_count) < 1) {
                if (p->lc_db != (XlcDatabase)NULL) {
-                   Xfree((char *)p->lc_db);
+                   Xfree(p->lc_db);
                }
                DestroyDatabase(p->database);
                if (prev == (XlcDatabaseList)NULL) {
@@ -1331,7 +1331,7 @@ _XlcCreateLocaleDataBase(
  err:
     DestroyDatabase(database);
     if (lc_db != (XlcDatabase)NULL) {
-       Xfree((char *)lc_db);
+       Xfree(lc_db);
     }
     Xfree (name);
     return (XPointer)NULL;
diff --git a/src/xlibi18n/lcRM.c b/src/xlibi18n/lcRM.c
index aec93a2..bdc20f2 100644
--- a/src/xlibi18n/lcRM.c
+++ b/src/xlibi18n/lcRM.c
@@ -85,7 +85,7 @@ ub_destroy(
     XPointer state)
 {
     _XCloseLC(((UbState) state)->lcd);
-    Xfree((char *) state);
+    Xfree(state);
 }
 
 static const XrmMethodsRec ub_methods = {
@@ -177,7 +177,7 @@ mb_destroy(
 {
     _XlcCloseConverter(((MbState) state)->conv);
     _XCloseLC(((MbState) state)->lcd);
-    Xfree((char *) state);
+    Xfree(state);
 }
 
 static const XrmMethodsRec mb_methods = {
@@ -214,7 +214,7 @@ _XrmDefaultInitParseInfo(
        state->lcd = lcd;
        state->conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar);
        if (state->conv == NULL) {
-           Xfree((char *) state);
+           Xfree(state);
            return (XrmMethods) NULL;
        }
 
diff --git a/src/xlibi18n/lcUTF8.c b/src/xlibi18n/lcUTF8.c
index f9739c1..0f3d0d2 100644
--- a/src/xlibi18n/lcUTF8.c
+++ b/src/xlibi18n/lcUTF8.c
@@ -100,7 +100,7 @@ static void
 close_converter(
     XlcConv conv)
 {
-    Xfree((char *) conv);
+    Xfree(conv);
 }
 
 /* Replacement character for invalid multibyte sequence or wide character. */
@@ -539,7 +539,7 @@ close_tocs_converter(
     XlcConv conv)
 {
     /* conv->state is allocated together with conv, free both at once.  */
-    Xfree((char *) conv);
+    Xfree(conv);
 }
 
 /*
diff --git a/src/xlibi18n/mbWMProps.c b/src/xlibi18n/mbWMProps.c
index bff7aa3..1b3dc97 100644
--- a/src/xlibi18n/mbWMProps.c
+++ b/src/xlibi18n/mbWMProps.c
@@ -61,9 +61,9 @@ XmbSetWMProperties (
     XSetWMProperties(dpy, w, wprop, iprop, argv, argc,
                     sizeHints, wmHints, classHints);
     if (wprop)
-       Xfree((char *)wname.value);
+       Xfree(wname.value);
     if (iprop)
-       Xfree((char *)iname.value);
+       Xfree(iname.value);
 
     /* Note: The WM_LOCALE_NAME property is set by XSetWMProperties. */
 }
diff --git a/src/xlibi18n/utf8WMProps.c b/src/xlibi18n/utf8WMProps.c
index bbfb7c0..80454e6 100644
--- a/src/xlibi18n/utf8WMProps.c
+++ b/src/xlibi18n/utf8WMProps.c
@@ -83,9 +83,9 @@ Xutf8SetWMProperties (
     XSetWMProperties(dpy, w, wprop, iprop, argv, argc,
                     sizeHints, wmHints, classHints);
     if (wprop)
-       Xfree((char *)wname.value);
+       Xfree(wname.value);
     if (iprop)
-       Xfree((char *)iname.value);
+       Xfree(iname.value);
 
     /* Note: The WM_LOCALE_NAME property is set by XSetWMProperties. */
 }
-- 
1.7.9.2

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to