Fix more compiler warnings
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1258 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
49922f9a8a
commit
46fd1bbdf5
@ -46,6 +46,7 @@ SET(FREEGLUT_SRCS
|
||||
src/fg_gl2.c
|
||||
src/fg_gl2.h
|
||||
src/fg_init.c
|
||||
src/fg_init.h
|
||||
src/fg_internal.h
|
||||
src/fg_input_devices.c
|
||||
src/fg_joystick.c
|
||||
@ -139,7 +140,7 @@ ELSE()
|
||||
src/x11/fg_window_x11.c
|
||||
src/x11/fg_xinput_x11.c
|
||||
)
|
||||
IF(!(FREEGLUT_GLES2 OR FREEGLUT_GLES1))
|
||||
IF(NOT(FREEGLUT_GLES2 OR FREEGLUT_GLES1))
|
||||
LIST(APPEND FREEGLUT_SRCS
|
||||
src/x11/fg_internal_x11_glx.h
|
||||
src/x11/fg_display_x11_glx.c
|
||||
@ -194,7 +195,7 @@ IF(WIN32)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
IF(!ANDROID)
|
||||
# not setting -ansi as EGL/KHR headers doesn't support it
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi")
|
||||
|
@ -77,4 +77,6 @@ FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||
|
||||
# endif
|
||||
|
||||
extern void fgInitGL2();
|
||||
|
||||
#endif
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define FREEGLUT_BUILDING_LIB
|
||||
#include <GL/freeglut.h>
|
||||
#include "fg_internal.h"
|
||||
#include "fg_gl2.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
@ -102,8 +103,6 @@ extern void fgPlatformInitialize( const char* displayName );
|
||||
extern void fgPlatformDeinitialiseInputDevices ( void );
|
||||
extern void fgPlatformCloseDisplay ( void );
|
||||
extern void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext );
|
||||
extern void fgInitGL2();
|
||||
|
||||
|
||||
void fghParseCommandLineArguments ( int* pargc, char** argv, char **pDisplayName, char **pGeometry )
|
||||
{
|
||||
|
@ -166,7 +166,6 @@ static void poll_dials ( int id )
|
||||
static int dial_state = DIAL_NEW;
|
||||
static int dial_which;
|
||||
static int dial_value;
|
||||
static int dials[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
if ( !dialbox_port ) return;
|
||||
|
||||
@ -187,7 +186,6 @@ static void poll_dials ( int id )
|
||||
case DIAL_VALUE_LOW:
|
||||
dial_value |= data;
|
||||
if ( dial_value & 0x8000 ) dial_value -= 0x10000;
|
||||
dials[dial_which] = dial_value;
|
||||
send_dial_event ( dial_which + 1, dial_value * 360 / 256 );
|
||||
dial_state = DIAL_WHICH_DEVICE;
|
||||
break;
|
||||
|
@ -166,7 +166,13 @@
|
||||
typedef unsigned long fg_time_t;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __fg_unused
|
||||
# ifdef __GNUC__
|
||||
# define __fg_unused __attribute__((unused))
|
||||
# else
|
||||
# define __fg_unused
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Platform-specific includes */
|
||||
#if TARGET_HOST_POSIX_X11
|
||||
|
@ -137,7 +137,7 @@ GLboolean fgPlatformChangeDisplayMode( GLboolean haveToTest )
|
||||
/* magic happenings behind my back, its lib for devels at last ;) */
|
||||
|
||||
/* append display mode to error to make things more informative */
|
||||
sprintf(displayMode,"%s Problem with requested mode: %ix%i:%i@%i", fggmstr, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency);
|
||||
sprintf(displayMode,"%s Problem with requested mode: %lux%lu:%lu@%lu", fggmstr, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency);
|
||||
fgWarning(displayMode);
|
||||
}
|
||||
|
||||
|
@ -394,10 +394,12 @@ void fghComputeWindowRectFromClientArea_UseStyle( const DWORD windowStyle, RECT
|
||||
|
||||
/* If window has title bar, correct rect for it */
|
||||
if (windowStyle & WS_MAXIMIZEBOX) /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */
|
||||
{
|
||||
if (posIsOutside)
|
||||
clientRect->bottom += GetSystemMetrics( SM_CYCAPTION );
|
||||
else
|
||||
clientRect->top -= GetSystemMetrics( SM_CYCAPTION );
|
||||
}
|
||||
|
||||
/* get width of window's borders (frame), correct rect for it.
|
||||
* Note, borders can be of zero width if style does not specify borders
|
||||
@ -462,10 +464,12 @@ void fghComputeClientAreaFromWindowRect( const SFG_Window *window, RECT *windowR
|
||||
|
||||
/* If window has title bar, correct rect for it */
|
||||
if (windowStyle & WS_MAXIMIZEBOX) /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */
|
||||
{
|
||||
if (wantPosOutside)
|
||||
windowRect->bottom -= GetSystemMetrics( SM_CYCAPTION );
|
||||
else
|
||||
windowRect->top += GetSystemMetrics( SM_CYCAPTION );
|
||||
}
|
||||
|
||||
/* get width of window's borders (frame), correct rect for it.
|
||||
* Note, borders can be of zero width if style does not specify borders
|
||||
|
@ -29,7 +29,9 @@
|
||||
#define FREEGLUT_BUILDING_LIB
|
||||
#include <limits.h> /* LONG_MAX */
|
||||
#include <GL/freeglut.h>
|
||||
#include "../fg_internal.h"
|
||||
#include "fg_internal.h"
|
||||
#include "fg_init.h"
|
||||
#include "egl/fg_init_egl.h"
|
||||
|
||||
/* Return the atom associated with "name". */
|
||||
static Atom fghGetAtom(const char * name)
|
||||
|
@ -56,9 +56,6 @@ typedef struct _serialport SERIALPORT;
|
||||
|
||||
void serial_flush ( SERIALPORT *port );
|
||||
|
||||
/* local variables */
|
||||
static SERIALPORT *dialbox_port=NULL;
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -48,8 +48,6 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
|
||||
{
|
||||
int status;
|
||||
|
||||
int i;
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
int len;
|
||||
|
||||
|
@ -40,6 +40,8 @@
|
||||
# define VFPRINTF(s,f,a)
|
||||
#endif
|
||||
|
||||
#include "fg_main.h"
|
||||
|
||||
/*
|
||||
* Try to get the maximum value allowed for ints, falling back to the minimum
|
||||
* guaranteed by ISO C99 if there is no suitable header.
|
||||
@ -298,7 +300,7 @@ static const char* fghColormapStateToString( int state )
|
||||
}
|
||||
}
|
||||
|
||||
static void fghPrintEvent( XEvent *event )
|
||||
__fg_unused static void fghPrintEvent( XEvent *event )
|
||||
{
|
||||
switch( event->type ) {
|
||||
|
||||
|
@ -26,7 +26,10 @@
|
||||
*/
|
||||
|
||||
#include <GL/freeglut.h>
|
||||
#include "../fg_internal.h"
|
||||
#include "fg_internal.h"
|
||||
#ifdef EGL_VERSION_1_0
|
||||
#include "egl/fg_state_egl.h"
|
||||
#endif
|
||||
|
||||
int fgPlatformGlutDeviceGet ( GLenum eWhat )
|
||||
{
|
||||
|
@ -27,7 +27,10 @@
|
||||
*/
|
||||
|
||||
#include <GL/freeglut.h>
|
||||
#include "../fg_internal.h"
|
||||
#include "fg_internal.h"
|
||||
#ifdef EGL_VERSION_1_0
|
||||
#include "egl/fg_structure_egl.h"
|
||||
#endif
|
||||
|
||||
extern SFG_Structure fgStructure;
|
||||
|
||||
|
@ -132,7 +132,6 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title,
|
||||
XWMHints wmHints;
|
||||
XEvent eventReturnBuffer; /* return buffer required for a call */
|
||||
unsigned long mask;
|
||||
int num_FBConfigs, i;
|
||||
unsigned int current_DisplayMode = fgState.DisplayMode ;
|
||||
|
||||
/* Save the display mode if we are creating a menu window */
|
||||
|
Reference in New Issue
Block a user