Skip to content

Commit

Permalink
Fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Oct 19, 2023
1 parent 3707321 commit 7c9e9b3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/osgEarth/Threading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ JobArena::runJobs()
// See if we no longer need this thread because the
// target concurrency has been reduced
ScopedMutexLock quitLock(_quitMutex);
if (_targetConcurrency < _metrics->concurrency)
if ((int)_targetConcurrency < _metrics->concurrency)
{
_metrics->concurrency--;
break;
Expand All @@ -820,7 +820,7 @@ JobArena::startThreads()
OE_INFO << LC << "Arena \"" << _name << "\" concurrency=" << _targetConcurrency << std::endl;

// Not enough? Start up more
while(_metrics->concurrency < _targetConcurrency)
while(_metrics->concurrency < (int)_targetConcurrency)
{
_metrics->concurrency++;

Expand Down
2 changes: 1 addition & 1 deletion src/osgEarth/TileLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ TileLayer::getBestAvailableTileKey(
ScopedWriteLock lock(_data_mutex);
if (!_dataExtentsIndex) // Double check
{
OE_INFO << LC << "Building data extents index with " << _dataExtents.size() << " extents" << std::endl;
OE_DEBUG << LC << "Building data extents index with " << _dataExtents.size() << " extents" << std::endl;
DataExtentsIndex* dataExtentsIndex = new DataExtentsIndex();
for (auto de = _dataExtents.begin(); de != _dataExtents.end(); ++de)
{
Expand Down
4 changes: 2 additions & 2 deletions src/osgEarth/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,11 @@ GeometryValidator::apply(osg::Geometry& geom)
osg::DrawArrays* da = dynamic_cast<osg::DrawArrays*>(pset);
if ( da )
{
if ( da->getFirst() >= numVerts )
if ( da->getFirst() >= (GLint)numVerts )
{
OE_NOTICE << LC << "DrawArrays: first > numVerts" << std::endl;
}
if ( da->getFirst()+da->getCount() > numVerts )
if ( da->getFirst()+da->getCount() > (GLint)numVerts )
{
OE_NOTICE << LC << "DrawArrays: first/count out of bounds" << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/osgEarthDrivers/engine_rex/TileNodeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ TileNodeRegistry::collectDormantTiles(

if (tile->getDoNotExpire() == false &&
tile->getLastTraversalTime() < oldestAllowableTime &&
tile->getLastTraversalFrame() < oldestAllowableFrame &&
tile->getLastTraversalFrame() < (int)oldestAllowableFrame &&
tile->getLastTraversalRange() > farthestAllowableRange &&
tile->areSiblingsDormant())
{
Expand Down
2 changes: 1 addition & 1 deletion src/osgEarthDrivers/fastdxt/FastDXTImageProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class FastDXTProcessor : public osgDB::ImageProcessor

// interate over mipmap levels:
unsigned int numLevels = mipmapped->getNumMipmapLevels();
for (int level = 0; level < numLevels; ++level)
for (unsigned level = 0; level < numLevels; ++level)
{
int level_s = sourceImage->s() >> level;
int level_t = sourceImage->t() >> level;
Expand Down

0 comments on commit 7c9e9b3

Please sign in to comment.