diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp index 8ef8fea4..942b68d7 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp @@ -785,6 +785,7 @@ void plAudioSystem::IUpdateSoftSounds( const hsPoint3 &newPosition ) case plSound::kStreamFromDisk: color = plStatusLog::kYellow; break; case plSound::kStreamFromRAM: color = plStatusLog::kWhite; break; case plSound::kStreamCompressed: color = plStatusLog::kRed; break; + default: break; } if(sound->GetType() == plgAudioSys::kVoice) color = 0xffff8800; if(sound->IsPropertySet(plSound::kPropIncidental)) color = 0xff00ffff; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp index 85ce334e..5f2ecffb 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp @@ -190,10 +190,9 @@ plSoundEvent::Types plSoundEvent::GetTypeFromCallbackMsg( plEventCallbackMsg *ms switch( msg->fEvent ) { case ::kStart: return kStart; - case ::kTime: return kTime; - case ::kStop: return kStop; - case ::kLoop: return kLoop; + case ::kTime: return kTime; + case ::kStop: return kStop; + case ::kLoop: return kLoop; + default: return kStop; } - - return kStop; -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp index cf171989..bd94e798 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp @@ -737,7 +737,7 @@ void plDynaDecalMgr::IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_ uint16_t* dataPtr = nil; grp->ReserveIndexStorage(maxNumIdx, &aux->fIBufferIdx, &aux->fIStartIdx, &dataPtr); - aux->fIStartIdx /* should be assigning something? */; + //aux->fIStartIdx /* should be assigning something? */; aux->fILength = 0; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp index 37741dae..1fb22f83 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp @@ -960,7 +960,6 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h IEnsureSurfaceUpdated(); #if HS_BUILD_FOR_WIN32 - SIZE size; ::GetTextExtentPoint32( fRGBSurface.fDC, text, strlen( text ), &size ); @@ -968,6 +967,8 @@ uint16_t plDynSurfaceWriter::CalcStringWidth( const char *text, uint16_t *h *height = (uint16_t)size.cy; return (uint16_t)size.cx; +#else + return 0; #endif } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp index 649fbb2b..9aaeb366 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp @@ -608,7 +608,7 @@ int plNetClientMgr::Update(double secs) // void plNetClientMgr::ICheckPendingStateLoad(double secs) { - if (!fPendingLoads.empty() && GetFlagsBit( kPlayingGame ) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount))) + if ((!fPendingLoads.empty() && GetFlagsBit(kPlayingGame)) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount))) { PendingLoadsList::iterator it = fPendingLoads.begin(); while ( it!=fPendingLoads.end() ) @@ -1198,8 +1198,8 @@ plString plNetClientMgr::GetPlayerNameById (unsigned playerId) const { unsigned plNetClientMgr::GetPlayerIdByName (const plString & name) const { // local case if (0 == name.Compare(NetCommGetPlayer()->playerNameAnsi)) - NetCommGetPlayer()->playerInt; - + return NetCommGetPlayer()->playerInt; + unsigned n = TransportMgr().GetNumMembers(); for (unsigned i = 0; i < n; ++i) if (plNetTransportMember * member = TransportMgr().GetMember(i)) diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp index c578688a..a274d397 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp @@ -157,7 +157,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg) info.AddValue( "Petition", "Language", plLocalization::GetLanguageName( plLocalization::GetLanguage() ) ); info.AddValue( "Petition", "AcctName", NetCommGetAccount()->accountNameAnsi ); char buffy[20]; - sprintf( buffy, "%lu", GetPlayerID() ); + sprintf(buffy, "%u", GetPlayerID()); info.AddValue( "Petition", "PlayerID", buffy ); info.AddValue( "Petition", "PlayerName", GetPlayerName() ); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp index 7a767f5d..a8072fca 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp @@ -263,6 +263,9 @@ void plNetLinkingMgr::ExecNextOp () { ); } break; + + default: + break; } s_opqueue.remove(op); @@ -1091,7 +1094,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void) info, &childLink)) { - case hsFail: + case static_cast(hsFail): success = kLinkFailed; break; case false: diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp index d5fbdbb2..0231cc54 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp @@ -286,14 +286,14 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const char objName[128]; int i=0; - + // copy objName token while(*c && *c != ',' && *c != ' ' && i<127) - objName[i++] = *c++; + objName[i++] = *c++; objName[i]=0; DebugObjectList::const_iterator it = fDebugObjects.begin(); - for( objName[0]; it != fDebugObjects.end(); it++) + for(; it != fDebugObjects.end(); it++) { if ((*it) && (*it)->StringMatches(objName)) { diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp b/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp index 2827daf0..79c9f8bb 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp @@ -319,7 +319,7 @@ void plAgeInfoStruct::SetAgeDescription( const char * v ) void plAgeInfoStruct::SetAgeLanguage( uint32_t v ) { - if ( v >= 0 ) + if (v != static_cast(-1)) { SetFlag( kHasAgeLanguage ); fAgeLanguage = v;