Pacify gcc 16 -Wuseless-cast in oldXMenu

* oldXMenu/Create.c (XMenuCreate):
* oldXMenu/XCrAssoc.c (XCreateAssocTable):
Omit useless casts.
This commit is contained in:
Paul Eggert 2026-07-15 11:38:17 -07:00
parent 36423e4572
commit 8c1345b48d
2 changed files with 7 additions and 8 deletions

View file

@ -201,7 +201,7 @@ XMenuCreate(Display *display, Window parent, register char const *def_env)
/* /*
* Create the XAssocTable * Create the XAssocTable
*/ */
assoc_tab = (XAssocTable *)XCreateAssocTable(XASSOC_TABLE_SIZE); assoc_tab = XCreateAssocTable (XASSOC_TABLE_SIZE);
if(assoc_tab == NULL) { if(assoc_tab == NULL) {
_XMErrorCode= XME_CREATE_ASSOC; _XMErrorCode= XME_CREATE_ASSOC;
return(NULL); return(NULL);
@ -441,31 +441,31 @@ XMenuCreate(Display *display, Window parent, register char const *def_env)
switch (inact_pnum) switch (inact_pnum)
{ {
case 0: case 0:
data = (char *)dimple1_bits; data = dimple1_bits;
width = dimple1_width; width = dimple1_width;
height = dimple1_height; height = dimple1_height;
break; break;
case 1: case 1:
data = (char *)dimple3_bits; data = dimple3_bits;
width = dimple3_width; width = dimple3_width;
height = dimple3_height; height = dimple3_height;
break; break;
case 2: case 2:
data = (char *)gray1_bits; data = gray1_bits;
width = gray1_width; width = gray1_width;
height = gray1_height; height = gray1_height;
break; break;
case 3: case 3:
data = (char *)gray3_bits; data = gray3_bits;
width = gray3_width; width = gray3_width;
height = gray3_height; height = gray3_height;
break; break;
case 4: case 4:
data = (char *)cross_weave_bits; data = cross_weave_bits;
width = cross_weave_width; width = cross_weave_width;
height = cross_weave_height; height = cross_weave_height;
break; break;

View file

@ -52,7 +52,7 @@ XAssocTable *XCreateAssocTable(register int size)
} }
/* calloc the buckets (actually just their headers). */ /* calloc the buckets (actually just their headers). */
buckets = (XAssoc *)calloc((unsigned)size, (unsigned)sizeof(XAssoc)); buckets = calloc (size, sizeof (XAssoc));
if (buckets == NULL) { if (buckets == NULL) {
/* calloc call failed! */ /* calloc call failed! */
errno = ENOMEM; errno = ENOMEM;
@ -72,4 +72,3 @@ XAssocTable *XCreateAssocTable(register int size)
return(table); return(table);
} }