From 6715018afffae2808a3d41d25bdd6dcc2bdf57e9 Mon Sep 17 00:00:00 2001 From: res Date: Wed, 16 Jan 2008 11:11:13 +0000 Subject: [PATCH] GCC warning fixes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7966 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_gecko.c | 7 ++++--- cl_gecko.h | 2 +- timing.h | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cl_gecko.c b/cl_gecko.c index 3819aea2..bff858c9 100644 --- a/cl_gecko.c +++ b/cl_gecko.c @@ -294,7 +294,8 @@ clgecko_t * CL_Gecko_FindBrowser( const char *name ) { return NULL; } -static void cl_gecko_updatecallback( rtexture_t *texture, clgecko_t *instance ) { +static void cl_gecko_updatecallback( rtexture_t *texture, void* callbackData ) { + clgecko_t *instance = callbackData; const unsigned char *data; if( instance->browser ) { // TODO: OSGK only supports BGRA right now @@ -714,7 +715,7 @@ static geckokeymapping_t geckokeymappingtable[] = { { K_SCROLLOCK, OSGKKey_ScrollLock } }; -qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventtype_t eventtype ) { +qboolean CL_Gecko_Event_Key( clgecko_t *instance, keynum_t key, clgecko_buttoneventtype_t eventtype ) { if( !instance || !instance->browser ) { return false; } @@ -725,7 +726,7 @@ qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventty OSGK_KeyboardEventType mappedtype; unsigned int mappedkey = key; - int i; + unsigned int i; // yes! then convert it if necessary! for( i = 0 ; i < sizeof( geckokeymappingtable ) / sizeof( *geckokeymappingtable ) ; i++ ) { const geckokeymapping_t * const mapping = &geckokeymappingtable[ i ]; diff --git a/cl_gecko.h b/cl_gecko.h index 05b74e92..3dd73372 100644 --- a/cl_gecko.h +++ b/cl_gecko.h @@ -31,7 +31,7 @@ void CL_Gecko_NavigateToURI( clgecko_t *instance, const char *URI ); void CL_Gecko_Event_CursorMove( clgecko_t *instance, float x, float y ); // returns whether the key/button event was handled or not -qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventtype_t eventtype ); +qboolean CL_Gecko_Event_Key( clgecko_t *instance, keynum_t key, clgecko_buttoneventtype_t eventtype ); void CL_Gecko_Resize( clgecko_t *instance, int width, int height ); // get the ratio between gecko instance's size in the texture and the actual texture size.. diff --git a/timing.h b/timing.h index 3dd3602c..310f4e8f 100644 --- a/timing.h +++ b/timing.h @@ -54,4 +54,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif -#endif // __TIMING_H__ \ No newline at end of file +#endif // __TIMING_H__ + -- 2.39.2