From 38fb597973df14501e17d14a3fe4d01e325c962e Mon Sep 17 00:00:00 2001 From: rkrolib Date: Mon, 22 Dec 2003 22:13:20 +0000 Subject: [PATCH] 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: https://svn.code.sf.net/p/freeglut/code/trunk@413 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_structure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_structure.c b/freeglut/freeglut/src/freeglut_structure.c index 71f9e45..8b0a837 100644 --- a/freeglut/freeglut/src/freeglut_structure.c +++ b/freeglut/freeglut/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;