1
0
Fork 0

fix warnings in Main

This commit is contained in:
Tim Moore 2009-08-24 18:03:49 +02:00
parent 67c7d8642a
commit 0a64405cad
7 changed files with 7 additions and 18 deletions

View file

@ -298,7 +298,6 @@ CameraInfo* CameraGroup::buildCamera(SGPropertyNode* cameraNode)
WindowBuilder *wBuild = WindowBuilder::getWindowBuilder();
const SGPropertyNode* windowNode = cameraNode->getNode("window");
GraphicsWindow* window = 0;
static int cameraNum = 0;
int cameraFlags = DO_INTERSECTION_TEST;
if (windowNode) {
// New style window declaration / definition
@ -400,7 +399,6 @@ CameraInfo* CameraGroup::buildGUICamera(SGPropertyNode* cameraNode,
const SGPropertyNode* windowNode = (cameraNode
? cameraNode->getNode("window")
: 0);
static int cameraNum = 0;
if (!window) {
if (windowNode) {
// New style window declaration / definition

View file

@ -187,7 +187,7 @@ FGIO::parse_port_config( const string& config )
FGRUL *rul = new FGRUL;
io = rul;
} else if ( protocol == "generic" ) {
int configToken;
size_t configToken;
if (tokens[1] == "socket") {
configToken = 7;
} else if (tokens[1] == "file") {

View file

@ -79,9 +79,6 @@ static osg::ref_ptr<osg::Camera> mainCamera;
void fgOSOpenWindow(bool stencil)
{
osg::GraphicsContext::WindowingSystemInterface* wsi
= osg::GraphicsContext::getWindowingSystemInterface();
viewer = new osgViewer::Viewer;
viewer->setDatabasePager(FGScenery::getPagerSingleton());
CameraGroup* cameraGroup = 0;

View file

@ -72,8 +72,6 @@ static void dumpOut(osg::Node* node)
char filename[24];
static int count = 1;
FGRenderer *renderer = globals->get_renderer();
while (count < 1000) {
FILE *fp;
snprintf(filename, 24, "fgviewer-%03d.osg", count++);

View file

@ -67,6 +67,9 @@ FGGlobals *globals;
// Constructor
FGGlobals::FGGlobals() :
props( new SGPropertyNode ),
initial_state( NULL ),
locale( NULL ),
renderer( new FGRenderer ),
subsystem_mgr( new SGSubsystemMgr ),
event_mgr( new SGEventMgr ),
@ -85,9 +88,6 @@ FGGlobals::FGGlobals() :
AI_mgr( NULL ),
controls( NULL ),
viewmgr( NULL ),
props( new SGPropertyNode ),
initial_state( NULL ),
locale( NULL ),
commands( SGCommandMgr::instance() ),
acmodel( NULL ),
model_mgr( NULL ),

View file

@ -996,7 +996,7 @@ fgOptRandomWind( const char *arg )
static int
fgOptWind( const char *arg )
{
double min_hdg, max_hdg, speed, gust;
double min_hdg = 0.0, max_hdg = 0.0, speed = 0.0, gust = 0.0;
if (!parse_wind( arg, &min_hdg, &max_hdg, &speed, &gust)) {
SG_LOG( SG_GENERAL, SG_ALERT, "bad wind value " << arg );
return FG_OPTIONS_ERROR;
@ -1815,9 +1815,9 @@ unsigned int getNumMaturity(const char * str)
{
// changes should also be reflected in $FG_ROOT/data/options.xml &
// $FG_ROOT/data/Translations/string-default.xml
const char levels[][20]= {"alpha","beta","early-production","production",0};
const char* levels[] = {"alpha","beta","early-production","production"};
for (unsigned int i=0; i<(sizeof(levels)/sizeof(levels[0])-1);i++)
for (size_t i=0; i<(sizeof(levels)/sizeof(levels[0]));i++)
if (strcmp(str,levels[i])==0)
return i;

View file

@ -542,9 +542,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
distance_attenuation );
static const SGPropertyNode *groundlevel_nearplane
= fgGetNode("/sim/current-view/ground-level-nearplane-m");
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
// update fog params
@ -766,7 +763,6 @@ bool
FGRenderer::pick(std::vector<SGSceneryPick>& pickList,
const osgGA::GUIEventAdapter* ea)
{
osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
// wipe out the return ...
pickList.clear();
typedef osgUtil::LineSegmentIntersector::Intersections Intersections;