From: H.G. Muller Date: Sun, 26 Feb 2012 16:18:39 +0000 (+0100) Subject: Fix two 64-bit warnings X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=609da796fb48d746f4672c00d2bd970834258b43;p=xboard.git Fix two 64-bit warnings Passing the engine number in a pointer variable to the callback needed a two-step cast. --- diff --git a/xboard.c b/xboard.c index 167e8cf..024ea90 100644 --- a/xboard.c +++ b/xboard.c @@ -3905,7 +3905,7 @@ MenuBarSelect (Widget w, caddr_t addr, caddr_t index) static void MenuEngineSelect (Widget w, caddr_t addr, caddr_t index) { - RecentEngineEvent((int) addr); + RecentEngineEvent((int) (intptr_t) addr); } void @@ -3930,7 +3930,7 @@ AppendEnginesToMenu (Widget menu, char *list) entry = XtCreateManagedWidget("engine", smeBSBObjectClass, menu, args, j+1); XtAddCallback(entry, XtNcallback, (XtCallbackProc) MenuEngineSelect, - (caddr_t) i); + (caddr_t) (intptr_t) i); i++; *p = '\n'; list = p + 1; } }