diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-11 00:07:33 -0700 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:28 +0200 |
commit | 26256188b498e122e21ce0e05521dfc58f8b60a5 (patch) | |
tree | 44262a1dc19cef0e7d8483133bb4d416f0b547f6 /nx-X11 | |
parent | d33cf0446fa6bd838f0020da2fd4a0884c2bc5ef (diff) | |
download | nx-libs-26256188b498e122e21ce0e05521dfc58f8b60a5.tar.gz nx-libs-26256188b498e122e21ce0e05521dfc58f8b60a5.tar.bz2 nx-libs-26256188b498e122e21ce0e05521dfc58f8b60a5.zip |
Remove unnecessary casts of pointers to (char *) in calls to Xfree()
Left one cast behind that is necessary to change from const char *
to char * in nx-X11/lib/X11/lcCharSet.c.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11')
59 files changed, 230 insertions, 230 deletions
diff --git a/nx-X11/lib/X11/Context.c b/nx-X11/lib/X11/Context.c index 4bb465b1a..8a078713a 100644 --- a/nx-X11/lib/X11/Context.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/CvCols.c b/nx-X11/lib/X11/CvCols.c index f543f277b..87d49311c 100644 --- a/nx-X11/lib/X11/CvCols.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/FetchName.c b/nx-X11/lib/X11/FetchName.c index 7503482fa..060c4b183 100644 --- a/nx-X11/lib/X11/FetchName.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/Font.c b/nx-X11/lib/X11/Font.c index 26f29d301..041ac58e7 100644 --- a/nx-X11/lib/X11/Font.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/FontInfo.c b/nx-X11/lib/X11/FontInfo.c index 0cb5b1910..763aafb3d 100644 --- a/nx-X11/lib/X11/FontInfo.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/FontNames.c b/nx-X11/lib/X11/FontNames.c index 764711559..c50de2eeb 100644 --- a/nx-X11/lib/X11/FontNames.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/FreeEData.c b/nx-X11/lib/X11/FreeEData.c index 3a7abca74..ce78467d3 100644 --- a/nx-X11/lib/X11/FreeEData.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/FreeGC.c b/nx-X11/lib/X11/FreeGC.c index ab994bc64..926d50745 100644 --- a/nx-X11/lib/X11/FreeGC.c +++ b/nx-X11/lib/X11/FreeGC.c @@ -44,7 +44,7 @@ XFreeGC ( UnlockDisplay(dpy); SyncHandle(); _XFreeExtData(gc->ext_data); - Xfree ((char *) gc); + Xfree (gc); return 1; } diff --git a/nx-X11/lib/X11/GetFPath.c b/nx-X11/lib/X11/GetFPath.c index 8f8c6144a..76ff7327b 100644 --- a/nx-X11/lib/X11/GetFPath.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/GetHints.c b/nx-X11/lib/X11/GetHints.c index 80f93b427..589ee9ae2 100644 --- a/nx-X11/lib/X11/GetHints.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/GetNrmHint.c b/nx-X11/lib/X11/GetNrmHint.c index 939d353b9..7871d99de 100644 --- a/nx-X11/lib/X11/GetNrmHint.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/GetRGBCMap.c b/nx-X11/lib/X11/GetRGBCMap.c index c4eff5602..08dc1deaf 100644 --- a/nx-X11/lib/X11/GetRGBCMap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/GetStCmap.c b/nx-X11/lib/X11/GetStCmap.c index 1ca6a0c70..cea20e0f8 100644 --- a/nx-X11/lib/X11/GetStCmap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/GetWMCMapW.c b/nx-X11/lib/X11/GetWMCMapW.c index 04f98a8a8..a28e27ea1 100644 --- a/nx-X11/lib/X11/GetWMCMapW.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/GetWMProto.c b/nx-X11/lib/X11/GetWMProto.c index 1303382fe..32466218d 100644 --- a/nx-X11/lib/X11/GetWMProto.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/ICWrap.c b/nx-X11/lib/X11/ICWrap.c index dadc8f541..2a1d0d670 100644 --- a/nx-X11/lib/X11/ICWrap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/IMWrap.c b/nx-X11/lib/X11/IMWrap.c index 0f6ed5593..a7c1d98c1 100644 --- a/nx-X11/lib/X11/IMWrap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/ImUtil.c b/nx-X11/lib/X11/ImUtil.c index 16dd0fa79..523b2a718 100644 --- a/nx-X11/lib/X11/ImUtil.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/InitExt.c b/nx-X11/lib/X11/InitExt.c index 9e63a9ec2..968f0bb8d 100644 --- a/nx-X11/lib/X11/InitExt.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/IntAtom.c b/nx-X11/lib/X11/IntAtom.c index 25466ca20..3042b65dd 100644 --- a/nx-X11/lib/X11/IntAtom.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/KeyBind.c b/nx-X11/lib/X11/KeyBind.c index e29aeddc0..01f015c65 100644 --- a/nx-X11/lib/X11/KeyBind.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c index ef1d7fb27..f8e0d66fb 100644 --- a/nx-X11/lib/X11/LRGB.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/ListExt.c b/nx-X11/lib/X11/ListExt.c index 59599d1a6..f40924df7 100644 --- a/nx-X11/lib/X11/ListExt.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/ModMap.c b/nx-X11/lib/X11/ModMap.c index 2fabc560c..78d635bf5 100644 --- a/nx-X11/lib/X11/ModMap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/OpenDis.c b/nx-X11/lib/X11/OpenDis.c index 89f1edab3..3c56aa580 100644 --- a/nx-X11/lib/X11/OpenDis.c +++ b/nx-X11/lib/X11/OpenDis.c @@ -866,7 +866,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); @@ -908,17 +908,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) { @@ -926,7 +926,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); } if (dpy->display_name) @@ -937,15 +937,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); @@ -955,7 +955,7 @@ void _XFreeDisplayStructure(Display *dpy) while (qelt) { register _XQEvent *qnxt = qelt->next; - Xfree ((char *) qelt); + Xfree (qelt); qelt = qnxt; } } @@ -978,7 +978,7 @@ void _XFreeDisplayStructure(Display *dpy) _XFreeX11XCBStructure(dpy); #endif /* USE_XCB */ - Xfree ((char *)dpy); + Xfree (dpy); } /* OutOfMemory is called if malloc fails. XOpenDisplay returns NULL diff --git a/nx-X11/lib/X11/PolyReg.c b/nx-X11/lib/X11/PolyReg.c index f56a872ca..cb30f8422 100644 --- a/nx-X11/lib/X11/PolyReg.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/PutImage.c b/nx-X11/lib/X11/PutImage.c index 934fabe0f..e6ac9a23f 100644 --- a/nx-X11/lib/X11/PutImage.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/QuColors.c b/nx-X11/lib/X11/QuColors.c index 13a63eb25..0b9bc508f 100644 --- a/nx-X11/lib/X11/QuColors.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/Quarks.c b/nx-X11/lib/X11/Quarks.c index c3e9906f7..132ec6f67 100644 --- a/nx-X11/lib/X11/Quarks.c +++ b/nx-X11/lib/X11/Quarks.c @@ -230,7 +230,7 @@ ExpandQuarkTable(void) } } if (oldmask) - Xfree((char *)oldentries); + Xfree(oldentries); return True; } diff --git a/nx-X11/lib/X11/RdBitF.c b/nx-X11/lib/X11/RdBitF.c index cc3623394..f1e913819 100644 --- a/nx-X11/lib/X11/RdBitF.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/Region.c b/nx-X11/lib/X11/Region.c index 3c4263760..28fa3e416 100644 --- a/nx-X11/lib/X11/Region.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/RegstFlt.c b/nx-X11/lib/X11/RegstFlt.c index 5a1faa7e9..077ea424c 100644 --- a/nx-X11/lib/X11/RegstFlt.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/SetFPath.c b/nx-X11/lib/X11/SetFPath.c index b1afd8201..60aaef01e 100644 --- a/nx-X11/lib/X11/SetFPath.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/SetGetCols.c b/nx-X11/lib/X11/SetGetCols.c index fc3708585..83fa4c200 100644 --- a/nx-X11/lib/X11/SetGetCols.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/SetHints.c b/nx-X11/lib/X11/SetHints.c index 8e8413069..eed360f46 100644 --- a/nx-X11/lib/X11/SetHints.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/SetRGBCMap.c b/nx-X11/lib/X11/SetRGBCMap.c index def7a22ca..f413c0d69 100644 --- a/nx-X11/lib/X11/SetRGBCMap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/StBytes.c b/nx-X11/lib/X11/StBytes.c index 390f66832..df533c95d 100644 --- a/nx-X11/lib/X11/StBytes.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/StCols.c b/nx-X11/lib/X11/StCols.c index 95fd6eeba..42a29cd7f 100644 --- a/nx-X11/lib/X11/StCols.c +++ b/nx-X11/lib/X11/StCols.c @@ -102,7 +102,7 @@ XcmsStoreColors( * Free copies as needed. */ if (nColors > 1) { - Xfree((char *)pColors_tmp); + Xfree(pColors_tmp); } /* diff --git a/nx-X11/lib/X11/TextToStr.c b/nx-X11/lib/X11/TextToStr.c index 9252b62a8..03f71558b 100644 --- a/nx-X11/lib/X11/TextToStr.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/VisUtil.c b/nx-X11/lib/X11/VisUtil.c index aa679928a..17ca3631f 100644 --- a/nx-X11/lib/X11/VisUtil.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/Xrm.c b/nx-X11/lib/X11/Xrm.c index e83b28428..4cba0d5a3 100644 --- a/nx-X11/lib/X11/Xrm.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/cmsCmap.c b/nx-X11/lib/X11/cmsCmap.c index 8db6ffe30..c5401c05d 100644 --- a/nx-X11/lib/X11/cmsCmap.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/imDefIm.c b/nx-X11/lib/X11/imDefIm.c index ce2856bb2..4ccab53ae 100644 --- a/nx-X11/lib/X11/imDefIm.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/imLcIm.c b/nx-X11/lib/X11/imLcIm.c index 15e5bee4d..25872e8ab 100644 --- a/nx-X11/lib/X11/imLcIm.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/imThaiIm.c b/nx-X11/lib/X11/imThaiIm.c index d360d0890..c17723aca 100644 --- a/nx-X11/lib/X11/imThaiIm.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcCT.c b/nx-X11/lib/X11/lcCT.c index ee3c76878..6e3f21e92 100644 --- a/nx-X11/lib/X11/lcCT.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcCharSet.c b/nx-X11/lib/X11/lcCharSet.c index 57f13d501..0adf0adfc 100644 --- a/nx-X11/lib/X11/lcCharSet.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcConv.c b/nx-X11/lib/X11/lcConv.c index 0a8a67752..7d9a4738c 100644 --- a/nx-X11/lib/X11/lcConv.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcDB.c b/nx-X11/lib/X11/lcDB.c index 66250a023..1111ec955 100644 --- a/nx-X11/lib/X11/lcDB.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcDefConv.c b/nx-X11/lib/X11/lcDefConv.c index a17d358a6..3cd5c22c9 100644 --- a/nx-X11/lib/X11/lcDefConv.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcEuc.c b/nx-X11/lib/X11/lcEuc.c index 6917a0443..5b171a9f3 100644 --- a/nx-X11/lib/X11/lcEuc.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcGenConv.c b/nx-X11/lib/X11/lcGenConv.c index 4edc1250d..1f7c301f5 100644 --- a/nx-X11/lib/X11/lcGenConv.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcJis.c b/nx-X11/lib/X11/lcJis.c index dc2822ed9..a6917cf9f 100644 --- a/nx-X11/lib/X11/lcJis.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcRM.c b/nx-X11/lib/X11/lcRM.c index aec93a2a3..bdc20f21d 100644 --- a/nx-X11/lib/X11/lcRM.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/lcSjis.c b/nx-X11/lib/X11/lcSjis.c index eb5e4cad1..ac945570a 100644 --- a/nx-X11/lib/X11/lcSjis.c +++ b/nx-X11/lib/X11/lcSjis.c @@ -1420,7 +1420,7 @@ static void close_converter( XlcConv conv) { - Xfree((char *) conv); + Xfree(conv); } diff --git a/nx-X11/lib/X11/lcUTF8.c b/nx-X11/lib/X11/lcUTF8.c index f9739c10a..0f3d0d2ca 100644 --- a/nx-X11/lib/X11/lcUTF8.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/locking.c b/nx-X11/lib/X11/locking.c index 7c09c44d2..9f4fe0677 100644 --- a/nx-X11/lib/X11/locking.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/mbWMProps.c b/nx-X11/lib/X11/mbWMProps.c index 123d379fc..9fb57faca 100644 --- a/nx-X11/lib/X11/mbWMProps.c +++ b/nx-X11/lib/X11/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/nx-X11/lib/X11/utf8WMProps.c b/nx-X11/lib/X11/utf8WMProps.c index 2ac3e390b..09d643377 100644 --- a/nx-X11/lib/X11/utf8WMProps.c +++ b/nx-X11/lib/X11/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. */ } |