From: Richard Rauch Date: Mon, 22 Dec 2003 22:13:20 +0000 (+0000) Subject: Got rid of those int/ptr warnings on AMD64. (The code was X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=46fdc013410ba2df0ca8bd738f489b1e5bbde8b1;p=freeglut Got rid of those int/ptr warnings on AMD64. (The code was casting an {int} to a pointer, and later retrieving the int by another cast. It should be safe provided that pointers are at least as big as {int}, but GCC was giving warnings on my system, so...fixed.) git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@413 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index 71f9e45..8b0a837 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -516,7 +516,7 @@ static void fghcbWindowByID( SFG_Window *window, SFG_Enumerator *enumerator ) /* * Check the window's handle. Hope this works. Looks ugly. That's for sure. */ - if( window->ID == ( int )(enumerator->data) ) /* XXX int/ptr conversion! */ + if( window->ID == *( int *)(enumerator->data) ) { enumerator->found = GL_TRUE; enumerator->data = window; @@ -543,7 +543,7 @@ SFG_Window* fgWindowByID( int windowID ) * Uses a method very similiar for fgWindowByHandle... */ enumerator.found = GL_FALSE; - enumerator.data = ( void * )windowID; /* XXX int/pointer conversion! */ + enumerator.data = ( void * )&windowID; fgEnumWindows( fghcbWindowByID, &enumerator ); if( enumerator.found ) return ( SFG_Window * )enumerator.data;