Addressing bug report 3368139 about warnings under OpenSUSE. I added two explicit casts and an initialization.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@937 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-09-05 17:26:30 +00:00
parent 1cbc89e7f0
commit b9d2d7a189

View File

@ -1076,7 +1076,7 @@ static void get_display_origin(int *xp,int *yp)
#if TARGET_HOST_POSIX_X11 #if TARGET_HOST_POSIX_X11
static Bool fghWindowIsVisible( Display *display, XEvent *event, XPointer arg) static Bool fghWindowIsVisible( Display *display, XEvent *event, XPointer arg)
{ {
Window window = arg; Window window = (Window)arg;
return (event->type == MapNotify) && (event->xmap.window == window); return (event->type == MapNotify) && (event->xmap.window == window);
} }
#endif #endif
@ -1092,7 +1092,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
GLboolean gameMode, GLboolean isSubWindow ) GLboolean gameMode, GLboolean isSubWindow )
{ {
#if TARGET_HOST_POSIX_X11 #if TARGET_HOST_POSIX_X11
XVisualInfo * visualInfo; XVisualInfo * visualInfo = NULL;
XSetWindowAttributes winAttr; XSetWindowAttributes winAttr;
XTextProperty textProperty; XTextProperty textProperty;
XSizeHints sizeHints; XSizeHints sizeHints;
@ -1297,7 +1297,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
XFree(visualInfo); XFree(visualInfo);
if( !isSubWindow) if( !isSubWindow)
XPeekIfEvent( fgDisplay.Display, &eventReturnBuffer, &fghWindowIsVisible, window->Window.Handle ); XPeekIfEvent( fgDisplay.Display, &eventReturnBuffer, &fghWindowIsVisible, (XPointer)(window->Window.Handle) );
#elif TARGET_HOST_MS_WINDOWS #elif TARGET_HOST_MS_WINDOWS