HashLookOnly(): passing argument 2 of 'HashLookOnly' makes pointer from integer without a cast
Also HashFind() GCC14 --without-tk --without-tcl Related issue: https://github.com/RTimothyEdwards/magic/issues/323
This commit is contained in:
parent
c90bde4961
commit
e5c3e703c3
|
|
@ -434,7 +434,7 @@ pipehandler()
|
|||
int key;
|
||||
XKeyPressedEvent *KeyPressedEvent = (XKeyPressedEvent *) &xevent;
|
||||
|
||||
entry = HashLookOnly(&grOGLWindowTable, KeyPressedEvent->window);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)KeyPressedEvent->window);
|
||||
mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0;
|
||||
|
||||
event = TxNewEvent();
|
||||
|
|
@ -457,7 +457,7 @@ pipehandler()
|
|||
|
||||
XButtonEvent *ButtonEvent = (XButtonEvent *) &xevent;
|
||||
|
||||
entry = HashLookOnly(&grOGLWindowTable, ButtonEvent->window);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)ButtonEvent->window);
|
||||
mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0;
|
||||
|
||||
event = TxNewEvent();
|
||||
|
|
@ -504,7 +504,7 @@ pipehandler()
|
|||
width = ConfigureEvent->width;
|
||||
height = ConfigureEvent->height;
|
||||
|
||||
entry = HashLookOnly(&grOGLWindowTable, ConfigureEvent->window);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)ConfigureEvent->window);
|
||||
mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0;
|
||||
|
||||
screenRect.r_xbot = ConfigureEvent->x;
|
||||
|
|
@ -525,7 +525,7 @@ pipehandler()
|
|||
case VisibilityNotify: {
|
||||
XVisibilityEvent *VisEvent = (XVisibilityEvent*) &xevent;
|
||||
|
||||
entry = HashLookOnly(&grOGLWindowTable, VisEvent->window);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)VisEvent->window);
|
||||
mw = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
|
||||
switch(VisEvent->state)
|
||||
|
|
@ -555,7 +555,7 @@ pipehandler()
|
|||
XEvent discard;
|
||||
XExposeEvent *ExposeEvent = (XExposeEvent*) &xevent;
|
||||
|
||||
entry = HashLookOnly(&grOGLWindowTable, ExposeEvent->window);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)ExposeEvent->window);
|
||||
mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0;
|
||||
if (!mw)
|
||||
break;
|
||||
|
|
@ -586,7 +586,7 @@ pipehandler()
|
|||
|
||||
XAnyEvent *AnyEvent = (XAnyEvent *) &xevent;
|
||||
|
||||
entry = HashLookOnly(&grOGLWindowTable, AnyEvent->window);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)AnyEvent->window);
|
||||
mw = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
|
||||
SigDisableInterrupts();
|
||||
|
|
@ -852,7 +852,7 @@ GrOGLCreate(w, name)
|
|||
glXMakeCurrent(grXdpy, (GLXDrawable)wind, grXcontext);
|
||||
|
||||
w->w_grdata = (ClientData) wind;
|
||||
entry = HashFind(&grOGLWindowTable, wind);
|
||||
entry = HashFind(&grOGLWindowTable, (char *)wind);
|
||||
HashSetValue(entry,w);
|
||||
XDefineCursor(grXdpy, wind, oglCurrent.cursor);
|
||||
GrOGLIconUpdate(w, w->w_caption);
|
||||
|
|
@ -914,7 +914,7 @@ GrOGLDelete(w)
|
|||
HashEntry *entry;
|
||||
|
||||
xw = (Window) w->w_grdata;
|
||||
entry = HashLookOnly(&grOGLWindowTable,xw);
|
||||
entry = HashLookOnly(&grOGLWindowTable, (char *)xw);
|
||||
HashSetValue(entry,NULL);
|
||||
|
||||
XDestroyWindow(grXdpy, xw);
|
||||
|
|
|
|||
|
|
@ -794,7 +794,7 @@ grX11Stdin()
|
|||
}
|
||||
|
||||
grCurrent.window = ButtonEvent->window;
|
||||
entry = HashLookOnly(&grX11WindowTable,grCurrent.window);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)grCurrent.window);
|
||||
grCurrent.mw= (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
|
||||
event->txe_p.p_x = ButtonEvent->x;
|
||||
|
|
@ -811,7 +811,7 @@ grX11Stdin()
|
|||
event = TxNewEvent();
|
||||
|
||||
grCurrent.window = KeyPressedEvent->window;
|
||||
entry = HashLookOnly(&grX11WindowTable,grCurrent.window);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)grCurrent.window);
|
||||
grCurrent.mw= (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
|
||||
read(pipeRead, &c, sizeof(int));
|
||||
|
|
@ -832,7 +832,7 @@ grX11Stdin()
|
|||
MagWindow *w;
|
||||
|
||||
grCurrent.window = ExposeEvent->window;
|
||||
entry = HashLookOnly(&grX11WindowTable,grCurrent.window);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)grCurrent.window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
grCurrent.mw=w;
|
||||
if (!w)
|
||||
|
|
@ -867,7 +867,7 @@ grX11Stdin()
|
|||
MagWindow *w;
|
||||
|
||||
grCurrent.window = ConfigureEvent->window;
|
||||
entry = HashLookOnly(&grX11WindowTable,grCurrent.window);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)grCurrent.window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
grCurrent.mw=w;
|
||||
|
||||
|
|
@ -888,7 +888,7 @@ grX11Stdin()
|
|||
XVisibilityEvent *VisEvent = (XVisibilityEvent*) &xevent;
|
||||
MagWindow *w;
|
||||
|
||||
entry = HashLookOnly(&grX11WindowTable, VisEvent->window);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)VisEvent->window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
if (!w)
|
||||
break;
|
||||
|
|
@ -920,7 +920,7 @@ grX11Stdin()
|
|||
MagWindow *w;
|
||||
|
||||
grCurrent.window = anyEvent->window;
|
||||
entry = HashLookOnly(&grX11WindowTable, grCurrent.window);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)grCurrent.window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
|
||||
/* The line above is defintely NOT a good idea. w == 0 causes address
|
||||
|
|
@ -1233,7 +1233,7 @@ GrX11Create(w, name)
|
|||
grCurrent.mw = w;
|
||||
w->w_grdata = (ClientData) wind;
|
||||
|
||||
entry = HashFind(&grX11WindowTable,grCurrent.window);
|
||||
entry = HashFind(&grX11WindowTable, (char *)grCurrent.window);
|
||||
HashSetValue(entry,w);
|
||||
|
||||
XDefineCursor(grXdpy, grCurrent.window,grCurrent.cursor);
|
||||
|
|
@ -1282,7 +1282,7 @@ GrX11Delete(w)
|
|||
HashEntry *entry;
|
||||
|
||||
xw = (Window) w->w_grdata;
|
||||
entry = HashLookOnly(&grX11WindowTable,xw);
|
||||
entry = HashLookOnly(&grX11WindowTable, (char *)xw);
|
||||
HashSetValue(entry,NULL);
|
||||
|
||||
XDestroyWindow(grXdpy,xw);
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ windDoMacro(w, cmd, interactive)
|
|||
|
||||
if (cmd->tx_argc == argstart)
|
||||
{
|
||||
h = HashLookOnly(&MacroClients, wc);
|
||||
h = HashLookOnly(&MacroClients, (char *)wc);
|
||||
if (h == NULL)
|
||||
return;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue