From ed87a0b032fb0fb5bbd01a8caab0d990fbfe928f Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sun, 23 Dec 2018 22:16:05 -0600 Subject: [PATCH] Eliminate compiler warnings --- simgear/canvas/ShivaVG/src/shPath.c | 2 +- simgear/debug/logstream.cxx | 2 +- simgear/scene/util/SGSceneFeatures.cxx | 10 +++++----- simgear/sound/readwav.cxx | 8 ++++---- simgear/structure/subsystem_mgr.cxx | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/simgear/canvas/ShivaVG/src/shPath.c b/simgear/canvas/ShivaVG/src/shPath.c index 835fcd08..9c2c1ba2 100644 --- a/simgear/canvas/ShivaVG/src/shPath.c +++ b/simgear/canvas/ShivaVG/src/shPath.c @@ -1193,7 +1193,7 @@ VG_API_CALL VGboolean vgInterpolatePath(VGPath dstPath, VGPath startPath, SHfloat *procData1, *procData2; SHint procSegCount1=0, procSegCount2=0; SHint procDataCount1=0, procDataCount2=0; - SHuint8 *newSegs, *newData; + SHuint8 *newSegs, *newData=0; void *userData[4]; SHint segment1, segment2; SHint segindex, s,d,i; diff --git a/simgear/debug/logstream.cxx b/simgear/debug/logstream.cxx index eeda8901..93ba61b5 100644 --- a/simgear/debug/logstream.cxx +++ b/simgear/debug/logstream.cxx @@ -518,7 +518,7 @@ public: // SG_OSG (OSG notify) - will always be displayed regardless of FG log settings as OSG log level is configured // separately and thus it makes more sense to allow these message through. - if (p == SG_OSG) return true; + if (static_cast(p) == static_cast(SG_OSG)) return true; p = translatePriority(p); if (p >= SG_INFO) return true; diff --git a/simgear/scene/util/SGSceneFeatures.cxx b/simgear/scene/util/SGSceneFeatures.cxx index a3549a80..48aecf22 100644 --- a/simgear/scene/util/SGSceneFeatures.cxx +++ b/simgear/scene/util/SGSceneFeatures.cxx @@ -40,14 +40,14 @@ SGSceneFeatures::SGSceneFeatures() : _textureCompression(UseARBCompression), - _shaderLights(true), - _pointSpriteLights(true), - _distanceAttenuationLights(true), - _textureFilter(1), _MaxTextureSize(4096), _TextureCacheCompressionActive(true), _TextureCacheCompressionActiveTransparent(true), - _TextureCacheActive(false) + _TextureCacheActive(false), + _shaderLights(true), + _pointSpriteLights(true), + _distanceAttenuationLights(true), + _textureFilter(1) { } diff --git a/simgear/sound/readwav.cxx b/simgear/sound/readwav.cxx index 005cf193..d5c16cd2 100644 --- a/simgear/sound/readwav.cxx +++ b/simgear/sound/readwav.cxx @@ -65,16 +65,16 @@ namespace else if (numChannels == 2 && bitsPerSample == 16) rv = SG_SAMPLE_STEREO16; else if (numChannels == 2 && bitsPerSample == 8) rv = SG_SAMPLE_STEREO8; else { - char msg[65]; - snprintf(msg, 64, "Unsupported audio format: tracks: %i, bits/sample: %i", numChannels, bitsPerSample); + char msg[81]; + snprintf(msg, 80, "Unsupported audio format: tracks: %i, bits/sample: %i", numChannels, bitsPerSample); throw sg_exception(msg); } } else { if (numChannels == 1 && bitsPerSample == 4) rv = SG_SAMPLE_ADPCM; else if (numChannels == 1 && bitsPerSample == 8) rv = SG_SAMPLE_MULAW; else { - char msg[65]; - snprintf(msg, 64, "Unsupported compressed audio format: tracks: %i, bits/sample: %i", numChannels, bitsPerSample); + char msg[81]; + snprintf(msg, 80, "Unsupported compressed audio format: tracks: %i, bits/sample: %i", numChannels, bitsPerSample); throw sg_exception(msg); } } diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index a7294f5f..fc29e883 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -281,7 +281,7 @@ SGSubsystemGroup::incrementalInit() notifyDidChange(m->subsystem, State::INIT); ++_initPosition; - if (_initPosition < _members.size()) { + if (_initPosition < static_cast(_members.size())) { // start init of the next one notifyWillChange( _members[_initPosition]->subsystem, State::INIT); }