diff --git a/simgear/canvas/layout/BoxLayout.cxx b/simgear/canvas/layout/BoxLayout.cxx index 788c15a1..d0684f41 100644 --- a/simgear/canvas/layout/BoxLayout.cxx +++ b/simgear/canvas/layout/BoxLayout.cxx @@ -73,7 +73,7 @@ namespace canvas int stretch, uint8_t alignment ) { - ItemData item_data = {0}; + ItemData item_data = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; item_data.layout_item = item; item_data.stretch = std::max(0, stretch); diff --git a/simgear/nasal/code.c b/simgear/nasal/code.c index 007d4128..88b2c207 100644 --- a/simgear/nasal/code.c +++ b/simgear/nasal/code.c @@ -36,7 +36,7 @@ void naRuntimeError(naContext c, const char* fmt, ...) void naRethrowError(naContext subc) { - strncpy(subc->callParent->error, subc->error, sizeof(subc->error)); + strncpy(subc->callParent->error, subc->error, sizeof(subc->callParent->error)); subc->callParent->dieArg = subc->dieArg; longjmp(subc->callParent->jumpHandle, 1); } diff --git a/simgear/nasal/iolib.c b/simgear/nasal/iolib.c index b9119017..b98f85cc 100644 --- a/simgear/nasal/iolib.c +++ b/simgear/nasal/iolib.c @@ -7,7 +7,7 @@ #include "iolib.h" static void ghostDestroy(void* g); -naGhostType naIOGhostType = { ghostDestroy, "iofile" }; +naGhostType naIOGhostType = { ghostDestroy, "iofile", NULL, NULL }; static struct naIOGhost* ioghost(naRef r) { diff --git a/simgear/nasal/threadlib.c b/simgear/nasal/threadlib.c index d5e51ef6..9451e921 100644 --- a/simgear/nasal/threadlib.c +++ b/simgear/nasal/threadlib.c @@ -9,10 +9,10 @@ #include "code.h" static void lockDestroy(void* lock) { naFreeLock(lock); } -static naGhostType LockType = { lockDestroy }; +static naGhostType LockType = { lockDestroy, NULL, NULL, NULL }; static void semDestroy(void* sem) { naFreeSem(sem); } -static naGhostType SemType = { semDestroy }; +static naGhostType SemType = { semDestroy, NULL, NULL, NULL }; typedef struct { naContext ctx; diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index 828fe7c5..8ee640ae 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -2197,11 +2197,12 @@ public: _property->addChangeListener(this,initial); } - SGPropertyChangeCallback(const SGPropertyChangeCallback& other) : - _obj(other._obj), _callback(other._callback), _property(other._property) - { - _property->addChangeListener(this,false); - } + SGPropertyChangeCallback(const SGPropertyChangeCallback& other) + : SGPropertyChangeListener(other), + _obj(other._obj), _callback(other._callback), _property(other._property) + { + _property->addChangeListener(this,false); + } virtual ~SGPropertyChangeCallback() { diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index e7dd1abd..a64f9c6d 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -594,6 +594,7 @@ unsigned int SGSoundMgr::request_buffer(SGSoundSample *sample) case SG_SAMPLE_STEREO8: SG_LOG(SG_SOUND, SG_POPUP, "Stereo sound detected:\n" << sample->get_sample_name() << "\nUse two separate mono files instead if required."); format = AL_FORMAT_STEREO8; + break; default: SG_LOG(SG_SOUND, SG_ALERT, "unsupported audio format"); return buffer;