From 4cad6333ab447713e96fb14a278e529f5bc4f2a1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 11:53:17 -0800 Subject: CID-417 Checker: UNINIT_CTOR Function: LLFoundData::LLFoundData() File: /indra/newview/llappearancemgr.cpp --- indra/newview/llappearancemgr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1dec8c7bd8..8f4ce4498e 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -292,11 +292,11 @@ private: struct LLFoundData { - LLFoundData() {} + LLFoundData() : mAssetType(LLAssetType::AT_NONE), mWearable(NULL) {} LLFoundData(const LLUUID& item_id, - const LLUUID& asset_id, - const std::string& name, - LLAssetType::EType asset_type) : + const LLUUID& asset_id, + const std::string& name, + LLAssetType::EType asset_type) : mItemID(item_id), mAssetID(asset_id), mName(name), -- cgit v1.2.3 From f714e527c57741a6e60fe4bf5fa242b5d8e3d861 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 11:57:55 -0800 Subject: CID-415 Checker: DEADCODE Function: LLToolPie::handleTooltipObject(LLViewerObject *, std::basic_string, std::allocator>, std::basic_string, std::allocator>) File: /indra/newview/lltoolpie.cpp --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c79a66892d..39e71974fd 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -922,7 +922,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; if (mep) { - viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL; + viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); LLPluginClassMedia* media_plugin = NULL; if (media_impl.notNull() && (media_impl->hasMedia())) -- cgit v1.2.3 From a0bc58aac498dff7f06070bf3be025b5e396f84f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 12:07:05 -0800 Subject: CID-26 Checker: CTOR_DTOR_LEAK Function: LLViewerWindow::LLViewerWindow(const std::basic_string, std::allocator>&, const std::basic_string, std::allocator>&, int, int, int, int, int, int) File: /indra/newview/llviewerwindow.cpp --- indra/newview/llviewerwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c1817496b1..424b84a756 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1659,6 +1659,9 @@ LLViewerWindow::~LLViewerWindow() { llinfos << "Destroying Window" << llendl; destroyWindow(); + + delete mDebugText; + mDebugText = NULL; } -- cgit v1.2.3 From 2f062b9e5c761bce6d4d29e1a40283e37dfdfd53 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:02:19 -0800 Subject: CID-105 Checker: INVALIDATE_ITERATOR Function: LLLocationHistory::addItem(const LLLocationHistoryItem &) File: /indra/newview/lllocationhistory.cpp --- indra/newview/lllocationhistory.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index ae1b8f8540..f494f7d7c1 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -50,18 +50,19 @@ void LLLocationHistory::addItem(const LLLocationHistoryItem& item) { // check if this item doesn't duplicate any existing one location_list_t::iterator item_iter = std::find(mItems.begin(), mItems.end(),item); - if(item_iter != mItems.end()){ + if(item_iter != mItems.end()) // if it already exists, erase the old one + { mItems.erase(item_iter); } mItems.push_back(item); - // If the vector size exceeds the maximum, purge the oldest items. - if ((S32)mItems.size() > max_items) { - for(location_list_t::iterator i = mItems.begin(); i != mItems.end()-max_items; ++i) { - mItems.erase(i); - } + // If the vector size exceeds the maximum, purge the oldest items (at the start of the mItems vector). + if ((S32)mItems.size() > max_items) + { + mItems.erase(mItems.begin(), mItems.end()-max_items); } + llassert(mItems.size() <= max_items); } /* -- cgit v1.2.3 From c48f2d7873568c26d835d6ce1d80c3c3533854a6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:04:22 -0800 Subject: CID-104 Checker: INVALIDATE_ITERATOR Function: LLViewerWindowListener::saveSnapshot(const LLSD &) const File: /indra/newview/llviewerwindowlistener.cpp not a bug. --- indra/newview/llviewerwindowlistener.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp index de57788271..fae98cf49a 100644 --- a/indra/newview/llviewerwindowlistener.cpp +++ b/indra/newview/llviewerwindowlistener.cpp @@ -77,6 +77,7 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const { LL_ERRS("LLViewerWindowListener") << "LLViewerWindowListener::saveSnapshot(): " << "unrecognized type " << event["type"] << LL_ENDL; + return; } type = found->second; } -- cgit v1.2.3 From 3aed137a33712f9000333aa814f76183158183cb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:15:13 -0800 Subject: CID-101 Checker: INVALIDATE_ITERATOR Function: LLTextureCache::writeComplete(unsigned int, bool) File: /indra/newview/lltexturecache.cpp not really a bug, but rearranged a little. --- indra/newview/lltexturecache.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 051c189013..7dfd0c83fa 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1617,20 +1617,19 @@ bool LLTextureCache::writeComplete(handle_t handle, bool abort) { lockWorkers(); handle_map_t::iterator iter = mWriters.find(handle); - llassert_always(iter != mWriters.end()); - LLTextureCacheWorker* worker = iter->second; - if (worker->complete() || abort) + if (llverify(iter != mWriters.end())) { - mWriters.erase(handle); - unlockWorkers(); - worker->scheduleDelete(); - return true; - } - else - { - unlockWorkers(); - return false; + LLTextureCacheWorker* worker = iter->second; + if (worker->complete() || abort) + { + mWriters.erase(handle); + unlockWorkers(); + worker->scheduleDelete(); + return true; + } } + unlockWorkers(); + return false; } void LLTextureCache::prioritizeWrite(handle_t handle) -- cgit v1.2.3 From eeb30616f601a8e75403d7eb8ffed272a5915a17 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:26:05 -0800 Subject: CID-99 Checker: INVALIDATE_ITERATOR Function: LLAllocatorHeapProfile::parse(const std::basic_string, std::allocator>&) File: /indra/llcommon/llallocator_heap_profile.cpp not a bug, but make it clearer to coverity. --- indra/newview/lltexturecache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 7dfd0c83fa..a7f26f1df1 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1617,7 +1617,8 @@ bool LLTextureCache::writeComplete(handle_t handle, bool abort) { lockWorkers(); handle_map_t::iterator iter = mWriters.find(handle); - if (llverify(iter != mWriters.end())) + llassert(iter != mWriters.end()); + if (iter != mWriters.end()) { LLTextureCacheWorker* worker = iter->second; if (worker->complete() || abort) -- cgit v1.2.3 From bada10e2f2fcd15eff4aeec82288c4c64ad258ef Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:32:21 -0800 Subject: CID-114 Checker: MISSING_BREAK Function: renderBoundingBox(LLDrawable *, int) File: /indra/newview/llspatialpartition.cpp --- indra/newview/llspatialpartition.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 514d8facb4..465221c494 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2607,6 +2607,7 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) break; case LL_PCODE_LEGACY_TREE: gGL.color4f(0,0.5f,0,1); + break; default: gGL.color4f(1,0,1,1); break; -- cgit v1.2.3 From 5aedcb39362b64c22fc5e70135b44d1388cbd5a2 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:34:49 -0800 Subject: CID-112 Checker: MISSING_BREAK Function: LLViewerObject::processUpdateMessage(LLMessageSystem *, void **, unsigned int, e_object_update_type, LLDataPacker *) File: /indra/newview/llviewerobject.cpp not a bug. commented. --- indra/newview/llviewerobject.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 3c79045cc5..037393a8f9 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1172,6 +1172,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 60: // this is a terse 32 update // pos @@ -1211,6 +1212,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 32: // this is a terse 16 update this_update_precision = 16; -- cgit v1.2.3 From c84aa46ac8544704861a1fe12ef217d38e3f6276 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:36:27 -0800 Subject: CID-111 Checker: MISSING_BREAK Function: LLViewerObject::processUpdateMessage(LLMessageSystem *, void **, unsigned int, e_object_update_type, LLDataPacker *) File: /indra/newview/llviewerobject.cpp not a bug. commented. --- indra/newview/llviewerobject.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 037393a8f9..886f1d9ef5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -861,6 +861,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 60: this_update_precision = 32; // this is a terse update @@ -900,6 +901,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 32: this_update_precision = 16; test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT); -- cgit v1.2.3 From 481bf863c2194400fec15c3ebaac4a0f4d69ed6d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:49:44 -0800 Subject: CID-129 Checker: NO_EFFECT Function: LLTexLayerTemplate::getLayer(unsigned int) File: /indra/newview/lltexlayer.cpp --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 84c8b9d5f0..b8419e088a 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1860,7 +1860,7 @@ U32 LLTexLayerTemplate::updateWearableCache() } LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) { - if (mWearableCache.size() <= i || i < 0) + if (mWearableCache.size() <= i) { return NULL; } -- cgit v1.2.3 From e998513aa5e0aad186a16518e1d693fd2b3cf2b7 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:53:40 -0800 Subject: CID-128 Checker: NO_EFFECT Function: LLSpatialGroup::~LLSpatialGroup() File: /indra/newview/llspatialpartition.cpp --- indra/newview/llspatialpartition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 465221c494..2a57d48f16 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -294,7 +294,7 @@ LLSpatialGroup::~LLSpatialGroup() sNodeCount--; - if (gGLManager.mHasOcclusionQuery && mOcclusionQuery) + if (gGLManager.mHasOcclusionQuery && mOcclusionQuery[LLViewerCamera::sCurCameraID]) { sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]); } -- cgit v1.2.3 From d3f361752e5988800228cff11fcc50289b2f88c7 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 27 Jan 2010 14:00:02 -0800 Subject: Plumb getting and setting the system audio mute through appviewer Next step is to actually implement the OS-specific calls to do so. Until then, behavior is the same; the status bar will mute/unmute the "master" audio for the viewer *only* --- indra/newview/llappviewer.cpp | 14 +++++++++++++- indra/newview/llappviewer.h | 4 ++++ indra/newview/llappviewermacosx.cpp | 14 ++++++++++++++ indra/newview/llappviewermacosx.h | 3 +++ indra/newview/llstatusbar.cpp | 6 +++--- 5 files changed, 37 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0e248ff88b..9aa15789ed 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2685,7 +2685,7 @@ void LLAppViewer::handleViewerCrash() gMessageSystem->stopLogging(); } - LLWorld::getInstance()->getInfo(gDebugInfo); + if (LLWorld::instanceExists()) LLWorld::getInstance()->getInfo(gDebugInfo); // Close the debug file pApp->writeDebugInfo(); @@ -4405,3 +4405,15 @@ void LLAppViewer::launchUpdater() // LLAppViewer::instance()->forceQuit(); } + +//virtual +void LLAppViewer::setMasterSystemAudioMute(bool mute) +{ + gSavedSettings.setBOOL("MuteAudio", mute); +} + +//virtual +bool LLAppViewer::getMasterSystemAudioMute() +{ + return gSavedSettings.getBOOL("MuteAudio"); +} diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 40e74061b5..a011c5ebfd 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -168,6 +168,10 @@ public: void purgeCache(); // Clear the local cache. + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 1282e437f2..cc38a0940c 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -444,6 +444,20 @@ std::string LLAppViewerMacOSX::generateSerialNumber() return serial_md5; } +//virtual +void LLAppViewerMacOSX::setMasterSystemAudioMute(bool mute) +{ + // XXX TODO: make this actually set the OS's audio mute state + gSavedSettings.setBOOL("MuteAudio", mute); +} + +//virtual +bool LLAppViewerMacOSX::getMasterSystemAudioMute() +{ + // XXX TODO: make this actually get the OS's audio mute state + return gSavedSettings.getBOOL("MuteAudio"); +} + OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) { OSErr result = noErr; diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h index bc841fc3a7..cbf7e6c209 100644 --- a/indra/newview/llappviewermacosx.h +++ b/indra/newview/llappviewermacosx.h @@ -48,6 +48,9 @@ public: // virtual bool init(); // Override to do application initialization + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); protected: virtual bool restoreErrorTrap(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8a36475510..bff32af228 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -354,7 +354,7 @@ void LLStatusBar::refresh() childSetEnabled("stat_btn", net_stats_visible); // update the master volume button state - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); mBtnVolume->setToggleState(mute_audio); } @@ -523,8 +523,8 @@ void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) static void onClickVolume(void* data) { // toggle the master mute setting - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); - gSavedSettings.setBOOL("MuteAudio", !mute_audio); + bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); + LLAppViewer::instance()->setMasterSystemAudioMute(!mute_audio); } // sets the static variables necessary for the date -- cgit v1.2.3 From 78f725cb97cd05e5c716b0014b3cb4d30066d1ca Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:08:40 -0800 Subject: CID-161 Checker: OVERRUN_STATIC Function: LLViewerLogin::setGridChoice(EGridInfo) File: /indra/newview/llviewernetwork.cpp not a bug. clarified for coverity. --- indra/newview/llviewernetwork.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index d7b55d7e97..987d23630a 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -169,6 +169,7 @@ void LLViewerLogin::setGridChoice(EGridInfo grid) if(grid < 0 || grid >= GRID_INFO_COUNT) { llerrs << "Invalid grid index specified." << llendl; + return; } if(mGridChoice != grid || gSavedSettings.getS32("ServerChoice") != grid) -- cgit v1.2.3 From f257f26746eb68e5d192021120e1818800a626a3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:27:57 -0800 Subject: CID 201 Checker: RESOURCE_LEAK Function: LLInitialWearablesFetch::processWearablesMessage() File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index c21cdf9508..acb9e2ebb1 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2527,8 +2527,13 @@ void LLInitialWearablesFetch::processWearablesMessage() { llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID " << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl; + delete wearable_data; } } + else + { + delete wearable_data; + } // Add all current attachments to the requested items as well. LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); -- cgit v1.2.3 From 744def1ae9520a5085057b94f7053bca1b03ddee Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:34:07 -0800 Subject: CID-200 Checker: RESOURCE_LEAK Function: LLPanelEstateInfo::onKickUserCommit(const std::vector, std::allocator>, std::allocator, std::allocator>>> &, std::vector>&) File: /indra/newview/llfloaterregioninfo.cpp we don't use this structure, all the way back to 1.23 --- indra/newview/llfloaterregioninfo.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 85353ce308..d54736e942 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1521,11 +1521,6 @@ void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data) //--------------------------------------------------------------------------- // Kick from estate methods //--------------------------------------------------------------------------- -struct LLKickFromEstateInfo -{ - LLPanelEstateInfo *mEstatePanelp; - LLUUID mAgentID; -}; void LLPanelEstateInfo::onClickKickUser() { @@ -1547,11 +1542,6 @@ void LLPanelEstateInfo::onKickUserCommit(const std::vector& names, return; } - //keep track of what user they want to kick and other misc info - LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo(); - kick_info->mEstatePanelp = this; - kick_info->mAgentID = ids[0]; - //Bring up a confirmation dialog LLSD args; args["EVIL_USER"] = names[0]; -- cgit v1.2.3 From 0345701368d9c125c801b98d8f8c0621429e90b5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:37:59 -0800 Subject: CID-199 Checker: RESOURCE_LEAK Function: LLTaskInvFVBridge::removeItem() File: /indra/newview/llpanelobjectinventory.cpp we haven't actually used this new()'d structure, all the way back to 1.23 :/ --- indra/newview/llpanelobjectinventory.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index d4376550d6..5c5c35141e 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -463,10 +463,6 @@ BOOL LLTaskInvFVBridge::removeItem() } else { - remove_data_t* data = new remove_data_t; - data->first = mPanel; - data->second.first = mPanel->getTaskUUID(); - data->second.second.push_back(mUUID); LLSD payload; payload["task_id"] = mPanel->getTaskUUID(); payload["inventory_ids"].append(mUUID); -- cgit v1.2.3 From da3ee22daad52806bbf788a4acee7e7a653ef7d3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:39:59 -0800 Subject: CID-198 Checker: RESOURCE_LEAK Function: LLTextureFetchWorker::doWork(int) File: /indra/newview/lltexturefetch.cpp --- indra/newview/lltexturefetch.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 5ce6884239..404b79bfaf 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -661,6 +661,8 @@ bool LLTextureFetchWorker::doWork(S32 param) } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = SEND_HTTP_REQ; + delete responder; + responder = NULL; } } -- cgit v1.2.3 From 45e15b0b50bca05aba333d9f2a41748bfc1e9496 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:42:32 -0800 Subject: CID-197 Checker: RESOURCE_LEAK Function: LLToolDragAndDrop::giveInventoryCategory(const LLUUID &, LLInventoryCategory *, const LLUUID &) File: /indra/newview/lltooldraganddrop.cpp --- indra/newview/lltooldraganddrop.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 4420b046d8..125c62474e 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1404,18 +1404,6 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, gFloaterTools->dirty(); } -struct LLGiveInventoryInfo -{ - LLUUID mToAgentID; - LLUUID mInventoryObjectID; - LLUUID mIMSessionID; - LLGiveInventoryInfo(const LLUUID& to_agent, const LLUUID& obj_id, const LLUUID &im_session_id = LLUUID::null) : - mToAgentID(to_agent), - mInventoryObjectID(obj_id), - mIMSessionID(im_session_id) - {} -}; - void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, LLInventoryItem* item, const LLUUID& im_session_id) @@ -1584,8 +1572,6 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, } else { - LLGiveInventoryInfo* info = NULL; - info = new LLGiveInventoryInfo(to_agent, cat->getUUID(), im_session_id); LLSD args; args["COUNT"] = llformat("%d",giveable.countNoCopy()); LLSD payload; -- cgit v1.2.3 From f8f34c14c4913d008182a5853613ffbf154d9a26 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:45:44 -0800 Subject: follow-up fix to leak fix. --- indra/newview/llagentwearables.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index acb9e2ebb1..401d74c4ef 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2530,10 +2530,6 @@ void LLInitialWearablesFetch::processWearablesMessage() delete wearable_data; } } - else - { - delete wearable_data; - } // Add all current attachments to the requested items as well. LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); -- cgit v1.2.3 From b6684dce80db985803c7866c6955d1ca896b1b5c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:54:06 -0800 Subject: CID-196 Checker: RESOURCE_LEAK Function: process_improved_im(LLMessageSystem *, void **) File: /indra/newview/llviewermessage.cpp partial fix. either coverity doesn't grok that the remaining case gets freed way down the line by the callbacks, or.. it really doesnt. --- indra/newview/llpanelgroup.cpp | 8 ++++---- indra/newview/llviewermessage.cpp | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 1d447a22d7..ac58c35b06 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -560,10 +560,10 @@ void LLPanelGroup::chatGroup() } void LLPanelGroup::showNotice(const std::string& subject, - const std::string& message, - const bool& has_inventory, - const std::string& inventory_name, - LLOfferInfo* inventory_offer) + const std::string& message, + const bool& has_inventory, + const std::string& inventory_name, + LLOfferInfo* inventory_offer) { LLPanelGroupNotices* panel_notices = findChild("group_notices_tab_panel"); if(!panel_notices) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 36710e7532..764c54da1a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1987,6 +1987,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLPanelGroup::showNotice(subj,mes,group_id,has_inventory,item_name,info); } + else + { + delete info; + } } break; case IM_GROUP_INVITATION: -- cgit v1.2.3 From 576c69dfd9b4418263caa7e14d2d3e52ea8cf5e4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:57:02 -0800 Subject: CID-196 Checker: RESOURCE_LEAK Function: process_improved_im(LLMessageSystem *, void **) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 764c54da1a..29b7324a0d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2051,6 +2051,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (sizeof(offer_agent_bucket_t) != binary_bucket_size) { LL_WARNS("Messaging") << "Malformed inventory offer from agent" << LL_ENDL; + delete info; break; } bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; @@ -2062,6 +2063,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (sizeof(S8) != binary_bucket_size) { LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL; + delete info; break; } info->mType = (LLAssetType::EType) binary_bucket[0]; -- cgit v1.2.3 From 7dc1e2eedbf29396b6614f8e7e39b7938dd5e301 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:04:12 -0800 Subject: CID-195 Checker: RESOURCE_LEAK Function: LLAgentWearables::addLocalTextureObject(EWearableType, LLVOAvatarDefines::ETextureIndex, unsigned int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 3 ++- indra/newview/llwearable.cpp | 4 ++-- indra/newview/llwearable.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 401d74c4ef..b0ff3a5626 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1130,8 +1130,9 @@ void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type, if (!wearable) { llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl; + return; } - LLLocalTextureObject* lto = new LLLocalTextureObject(); + LLLocalTextureObject lto; wearable->setLocalTextureObject(texture_type, lto); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index b789bd3650..8cfb8b1103 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -818,7 +818,7 @@ const LLLocalTextureObject* LLWearable::getConstLocalTextureObject(S32 index) co return NULL; } -void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto) +void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject <o) { if( mTEMap.find(index) != mTEMap.end() ) { @@ -826,7 +826,7 @@ void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto) } if( lto ) { - mTEMap[index] = new LLLocalTextureObject(*lto); + mTEMap[index] = new LLLocalTextureObject(lto); } } diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 7a579b248e..dae983bcf3 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -114,7 +114,7 @@ public: LLLocalTextureObject* getLocalTextureObject(S32 index); const LLLocalTextureObject* getConstLocalTextureObject(S32 index) const; - void setLocalTextureObject(S32 index, LLLocalTextureObject *lto); + void setLocalTextureObject(S32 index, LLLocalTextureObject <o); void addVisualParam(LLVisualParam *param); void setVisualParams(); void setVisualParamWeight(S32 index, F32 value, BOOL upload_bake); -- cgit v1.2.3 From e7c17cb29b63fb85bf345133ed78a026a224af30 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:53:56 -0800 Subject: a follow-up fix. --- indra/newview/llwearable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 8cfb8b1103..d093031bea 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -824,10 +824,7 @@ void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject <o) { mTEMap.erase(index); } - if( lto ) - { - mTEMap[index] = new LLLocalTextureObject(lto); - } + mTEMap[index] = new LLLocalTextureObject(lto); } -- cgit v1.2.3 From 94e5625f2c5bfef9d6cd7e5ffdda3a0e64717d93 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:58:02 -0800 Subject: CID-255 Checker: UNINIT Function: process_improved_im(LLMessageSystem *, void **) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 29b7324a0d..aa77c9602f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1933,7 +1933,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (has_inventory) { - info = new LLOfferInfo; + info = new LLOfferInfo(); info->mIM = IM_GROUP_NOTICE; info->mFromID = from_id; -- cgit v1.2.3 From 1afc7ecc142c9ec066e5761497a4011698b50c8e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:11:32 -0800 Subject: CID-388 Checker: UNINIT_CTOR Function: LLPanelPlaceInfo::LLPanelPlaceInfo() File: /indra/newview/llpanelplaceinfo.cpp --- indra/newview/llpanellandmarkinfo.cpp | 2 +- indra/newview/llpanellandmarkinfo.h | 2 +- indra/newview/llpanelplaceinfo.cpp | 3 ++- indra/newview/llpanelplaceinfo.h | 8 +++++--- indra/newview/llpanelplaceprofile.cpp | 2 +- indra/newview/llpanelplaceprofile.h | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index c792fd4fe3..7a17d4a1f0 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -108,7 +108,7 @@ void LLPanelLandmarkInfo::resetLocation() } // virtual -void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) +void LLPanelLandmarkInfo::setInfoType(EInfoType type) { LLPanel* landmark_info_panel = getChild("landmark_info_panel"); diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 2a9949ae41..b3dc3f5ad9 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -49,7 +49,7 @@ public: /*virtual*/ void resetLocation(); - /*virtual*/ void setInfoType(INFO_TYPE type); + /*virtual*/ void setInfoType(EInfoType type); /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 5f75668722..9ebc8ca2b9 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -58,6 +58,7 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() mPosRegion(), mScrollingPanelMinHeight(0), mScrollingPanelWidth(0), + mInfoType(UNKNOWN), mScrollingPanel(NULL), mScrollContainer(NULL) {} @@ -120,7 +121,7 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id) } //virtual -void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) +void LLPanelPlaceInfo::setInfoType(EInfoType type) { mTitle->setText(mCurrentTitle); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 3091f7ed24..deedbd2b0f 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -54,8 +54,10 @@ class LLViewerInventoryCategory; class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver { public: - enum INFO_TYPE + enum EInfoType { + UNKNOWN, + AGENT, CREATE_LANDMARK, LANDMARK, @@ -79,7 +81,7 @@ public: // Depending on how the panel was triggered // (from landmark or current location, or other) // sets a corresponding title and contents. - virtual void setInfoType(INFO_TYPE type); + virtual void setInfoType(EInfoType type); // Requests remote parcel info by parcel ID. void sendParcelInfoRequest(); @@ -114,7 +116,7 @@ protected: std::string mCurrentTitle; S32 mScrollingPanelMinHeight; S32 mScrollingPanelWidth; - INFO_TYPE mInfoType; + EInfoType mInfoType; LLScrollContainer* mScrollContainer; LLPanel* mScrollingPanel; diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 3c798639d4..8d689b2c5e 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -207,7 +207,7 @@ void LLPanelPlaceProfile::resetLocation() } // virtual -void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) +void LLPanelPlaceProfile::setInfoType(EInfoType type) { bool is_info_type_agent = type == AGENT; diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 8ca9526875..e77b441567 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -48,7 +48,7 @@ public: /*virtual*/ void resetLocation(); - /*virtual*/ void setInfoType(INFO_TYPE type); + /*virtual*/ void setInfoType(EInfoType type); /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); -- cgit v1.2.3 From 23147ee1ee3fd37025fb777507a8e19810d94f3b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:13:11 -0800 Subject: CID-387 Checker: UNINIT_CTOR Function: LLTeleportHistoryPanel::ContextMenu::ContextMenu() File: /indra/newview/llpanelteleporthistory.cpp --- indra/newview/llpanelteleporthistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 1b8fb49641..6005881148 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -308,7 +308,7 @@ void LLTeleportHistoryFlatItemStorage::purge() //////////////////////////////////////////////////////////////////////////////// LLTeleportHistoryPanel::ContextMenu::ContextMenu() : - mMenu(NULL) + mMenu(NULL), mIndex(0) { } -- cgit v1.2.3 From 7814eaec0082dfc505076afca33b51eeb6f591fe Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:16:28 -0800 Subject: CID-386 Checker: UNINIT_CTOR Function: LLFolderBridge::LLFolderBridge(LLInventoryPanel *, const LLUUID &) File: /indra/newview/llinventorybridge.h --- indra/newview/llinventorybridge.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 759d0cba18..eeb8246b11 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -320,8 +320,12 @@ public: LLViewerInventoryCategory* getCategory() const; protected: - LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLInvFVBridge(inventory, uuid), mCallingCards(FALSE), mWearables(FALSE) {} + LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) + : LLInvFVBridge(inventory, uuid), + + mCallingCards(FALSE), + mWearables(FALSE), + mMenu(NULL) {} // menu callbacks static void pasteClipboard(void* user_data); -- cgit v1.2.3 From bfda8b2cfee5512f6737ea2802b69bdac66ed3ab Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:19:32 -0800 Subject: CID-385 Checker: UNINIT_CTOR Function: LLToolBar::LLToolBar() File: /indra/newview/lltoolbar.cpp --- indra/newview/lltoolbar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index edbaa0d45a..6df574a21a 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -95,9 +95,12 @@ F32 LLToolBar::sInventoryAutoOpenTime = 1.f; // LLToolBar::LLToolBar() -: LLPanel() + : LLPanel(), + + mInventoryAutoOpen(FALSE), + mNumUnreadIMs(0) #if LL_DARWIN - , mResizeHandle(NULL) + , mResizeHandle(NULL), #endif // LL_DARWIN { setIsChrome(TRUE); -- cgit v1.2.3 From bfd21c0886ccb9ebbb1f32785b008134c20e3de5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:20:44 -0800 Subject: CID-384 Checker: UNINIT_CTOR Function: LLSelectNode::LLSelectNode(const LLSelectNode&) File: /indra/newview/llselectmgr.cpp --- indra/newview/llselectmgr.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 60a095506b..6f76715e73 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5093,6 +5093,7 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep) mName = nodep.mName; mDescription = nodep.mDescription; mCategory = nodep.mCategory; + mInventorySerial = 0; mSavedPositionLocal = nodep.mSavedPositionLocal; mSavedPositionGlobal = nodep.mSavedPositionGlobal; mSavedScale = nodep.mSavedScale; -- cgit v1.2.3 From 344eaeb39bc8fa059960d44b0b0853d92530c411 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:27:02 -0800 Subject: CID-376 Checker: UNINIT_CTOR Function: LLViewerPart::LLViewerPart() File: /indra/newview/llviewerpartsim.cpp --- indra/newview/llviewerpartsim.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 841a7ccc5e..6b480ccf8e 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -81,6 +81,7 @@ F32 calc_desired_size(LLViewerCamera* camera, LLVector3 pos, LLVector2 scale) LLViewerPart::LLViewerPart() : mPartID(0), mLastUpdateTime(0.f), + mSkipOffset(0.f), mVPCallback(NULL), mImagep(NULL) { -- cgit v1.2.3 From 0ea467ad06acc8e90f46cf9b97d1509e287bbe5d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:31:41 -0800 Subject: CID-375 Checker: UNINIT_CTOR Function: LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw *, int) File: /indra/newview/llviewertexture.cpp --- indra/newview/llviewertexture.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index b80dc7d902..0ad269392d 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1029,6 +1029,8 @@ void LLViewerFetchedTexture::init(bool firstinit) // does not contain this image. mIsMissingAsset = FALSE; + mLoadedCallbackDesiredDiscardLevel = 0; + mNeedsCreateTexture = FALSE; mIsRawImageValid = FALSE; @@ -1041,6 +1043,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mFetchPriority = 0; mDownloadProgress = 0.f; mFetchDeltaTime = 999999.f; + mRequestDeltaTime = 0.f; mForSculpt = FALSE ; mIsFetched = FALSE ; -- cgit v1.2.3 From 73d92f0847936f51fc0e8f12140d0880f73a2b11 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:38:02 -0800 Subject: CID-374 Checker: UNINIT_CTOR Function: LLPickInfo::LLPickInfo(const LLCoordGL &, unsigned int, int, int, void (*)(const LLPickInfo&)) File: /indra/newview/llviewerwindow.cpp remove some fat, dead members. --- indra/newview/llviewerwindow.cpp | 8 ++++---- indra/newview/llviewerwindow.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 424b84a756..b4c73dba26 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4849,10 +4849,10 @@ LLPickInfo::LLPickInfo() } LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, - MASK keyboard_mask, - BOOL pick_transparent, - BOOL pick_uv_coords, - void (*pick_callback)(const LLPickInfo& pick_info)) + MASK keyboard_mask, + BOOL pick_transparent, + BOOL pick_uv_coords, + void (*pick_callback)(const LLPickInfo& pick_info)) : mMousePt(mouse_pos), mKeyMask(keyboard_mask), mPickCallback(pick_callback), diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index b488276a18..c0a9180b53 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -126,9 +126,6 @@ private: void updateXYCoords(); BOOL mWantSurfaceInfo; // do we populate mUVCoord, mNormal, mBinormal? - U8 mPickBuffer[PICK_DIAMETER * PICK_DIAMETER * 4]; - F32 mPickDepthBuffer[PICK_DIAMETER * PICK_DIAMETER]; - BOOL mPickParcelWall; }; -- cgit v1.2.3 From 373f6264082256a5c7877fb8b99336bf9cf1ca6b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:41:11 -0800 Subject: CID-373 Checker: UNINIT_CTOR Function: LLTexLayerSet::LLTexLayerSet(LLVOAvatarSelf *) File: /indra/newview/lltexlayer.cpp --- indra/newview/lltexlayer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index b8419e088a..ddb6405c41 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -567,6 +567,7 @@ LLTexLayerSet::LLTexLayerSet(LLVOAvatarSelf* const avatar) : mAvatar( avatar ), mUpdatesEnabled( FALSE ), mIsVisible( TRUE ), + mBakedTexIndex(LLVOAvatarDefines::BAKED_HEAD), mInfo( NULL ) { } -- cgit v1.2.3 From f2e202e6a4bd033e3d9aad3197f5aa491076245b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:43:48 -0800 Subject: CID-368 Checker: UNINIT_CTOR Function: LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject *, LLFlexibleObjectData *) File: /indra/newview/llflexibleobject.cpp --- indra/newview/llflexibleobject.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index fc8790c172..aea2de8e92 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -66,6 +66,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD mInitializedRes = -1; mSimulateRes = 0; mFrameNum = 0; + mCollisionSphereRadius = 0.f; mRenderRes = 1; if(mVO->mDrawable.notNull()) -- cgit v1.2.3 From 8bf32990fcb2426a9d177da6db631a0eda2d3219 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:45:42 -0800 Subject: CID-367 Checker: UNINIT_CTOR Function: LLFace::LLFace(LLDrawable *, LLViewerObject *) File: /indra/newview/llface.h --- indra/newview/llface.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index eef774426a..965ac1cad0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -157,6 +157,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mGeomIndex = 0; mIndicesCount = 0; mIndicesIndex = 0; + mIndexInTex = 0; mTexture = NULL; mTEOffset = -1; -- cgit v1.2.3 From 6c92a724a1893eceac644a65ff5660e73ba6d42e Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 27 Jan 2010 16:48:09 -0800 Subject: Implemented LLAppViewerMacOSX::setMasterSystemAudioMute() and LLAppViewerMacOSX::getMasterSystemAudioMute() using CoreAudio APIs. This required adding a reference to the CoreAudio framework in indra/newview/CMakeLists.txt --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/llappviewermacosx.cpp | 50 +++++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7ddeb90d29..4c0c895a7d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1064,11 +1064,13 @@ if (DARWIN) find_library(APPKIT_LIBRARY AppKit) find_library(COCOA_LIBRARY Cocoa) find_library(IOKIT_LIBRARY IOKit) + find_library(COREAUDIO_LIBRARY CoreAudio) set(viewer_LIBRARIES ${COCOA_LIBRARY} ${AGL_LIBRARY} ${IOKIT_LIBRARY} + ${COREAUDIO_LIBRARY} ) # Add resource files to the project. diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index cc38a0940c..f8f8f50cd6 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -50,6 +50,7 @@ #include #include "lldir.h" #include +#include // for systemwide mute class LLMediaCtrl; // for LLURLDispatcher namespace @@ -444,18 +445,57 @@ std::string LLAppViewerMacOSX::generateSerialNumber() return serial_md5; } +static AudioDeviceID get_default_audio_output_device(void) +{ + AudioDeviceID device = 0; + UInt32 size; + OSStatus err; + + size = sizeof(device); + err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &device); + if(err != noErr) + { + LL_DEBUGS("SystemMute") << "Couldn't get default audio output device (0x" << std::hex << err << ")" << LL_ENDL; + } + + return device; +} + //virtual -void LLAppViewerMacOSX::setMasterSystemAudioMute(bool mute) +void LLAppViewerMacOSX::setMasterSystemAudioMute(bool new_mute) { - // XXX TODO: make this actually set the OS's audio mute state - gSavedSettings.setBOOL("MuteAudio", mute); + AudioDeviceID device = get_default_audio_output_device(); + + if(device != 0) + { + UInt32 mute = new_mute; + OSStatus err = AudioDeviceSetProperty(device, NULL, 0, false, kAudioDevicePropertyMute, sizeof(mute), &mute); + if(err != noErr) + { + LL_INFOS("SystemMute") << "Couldn't set audio mute property (0x" << std::hex << err << ")" << LL_ENDL; + } + } } //virtual bool LLAppViewerMacOSX::getMasterSystemAudioMute() { - // XXX TODO: make this actually get the OS's audio mute state - return gSavedSettings.getBOOL("MuteAudio"); + // Assume the system isn't muted + UInt32 mute = 0; + + AudioDeviceID device = get_default_audio_output_device(); + + if(device != 0) + { + UInt32 size = sizeof(mute); + OSStatus err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyMute, &size, &mute); + if(err != noErr) + { + LL_DEBUGS("SystemMute") << "Couldn't get audio mute property (0x" << std::hex << err << ")" << LL_ENDL; + } + } + + return (mute != 0); } OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) -- cgit v1.2.3 From 63aef899bc6274d2b7fd90de8ed7e01cb6bb7359 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:49:51 -0800 Subject: CID-365 Checker: UNINIT_CTOR Function: LLSurfacePatch::LLSurfacePatch() File: /indra/newview/llsurfacepatch.cpp --- indra/newview/llsurfacepatch.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 0ce794addb..48e4a6ccc7 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -60,6 +60,7 @@ LLSurfacePatch::LLSurfacePatch() : mHeightsGenerated(FALSE), mDataOffset(0), mDataZ(NULL), + mDataNorm(NULL), mVObjp(NULL), mOriginRegion(0.f, 0.f, 0.f), mCenterRegion(0.f, 0.f, 0.f), @@ -355,12 +356,14 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride) normal %= c2; normal.normVec(); + llassert(mDataNorm); *(mDataNorm + surface_stride * y + x) = normal; } const LLVector3 &LLSurfacePatch::getNormal(const U32 x, const U32 y) const { U32 surface_stride = mSurfacep->getGridsPerEdge(); + llassert(mDataNorm); return *(mDataNorm + surface_stride * y + x); } @@ -402,6 +405,7 @@ void LLSurfacePatch::updateVerticalStats() U32 i, j, k; F32 z, total; + llassert(mDataZ); z = *(mDataZ); mMinZ = z; -- cgit v1.2.3 From 056ca2ae5c1a145483c75e85fa7b1bee746b2627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:51:46 -0800 Subject: CID-359 Checker: UNINIT_CTOR Function: LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture *, const LLUUID &) File: /indra/newview/lllocaltextureobject.cpp --- indra/newview/lllocaltextureobject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocaltextureobject.cpp b/indra/newview/lllocaltextureobject.cpp index 6bcbe6f58c..69eb5fce2f 100644 --- a/indra/newview/lllocaltextureobject.cpp +++ b/indra/newview/lllocaltextureobject.cpp @@ -47,7 +47,9 @@ LLLocalTextureObject::LLLocalTextureObject() : mImage = NULL; } -LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture* image, const LLUUID& id) +LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture* image, const LLUUID& id) : + mIsBakedReady(FALSE), + mDiscard(MAX_DISCARD_LEVEL+1) { mImage = image; gGL.getTexUnit(0)->bind(mImage); -- cgit v1.2.3 From ce436d20f09269dd3715b29a1ed0addb132b35cb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:53:18 -0800 Subject: CID-360 Checker: UNINIT_CTOR Function: LLViewerVisualParamInfo::LLViewerVisualParamInfo() File: /indra/newview/llviewervisualparam.cpp --- indra/newview/llviewervisualparam.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index b088ef0730..fad398e00b 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -46,6 +46,7 @@ LLViewerVisualParamInfo::LLViewerVisualParamInfo() : mWearableType( WT_INVALID ), + mCrossWearable(FALSE), mCamDist( 0.5f ), mCamAngle( 0.f ), mCamElevation( 0.f ), -- cgit v1.2.3 From d9661c3d2a26dd4379a6f57dc8227ee2e73f8ec6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:57:10 -0800 Subject: CID-358 Checker: UNINIT_CTOR Function: LLTextureCache::Entry::Entry() File: /indra/newview/lltexturecache.h --- indra/newview/lltexturecache.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 4203cbbc43..64ec881fc3 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -59,7 +59,12 @@ private: }; struct Entry { - Entry() {} + Entry() : + mBodySize(0), + mImageSize(0), + mTime(0) + { + } Entry(const LLUUID& id, S32 imagesize, S32 bodysize, U32 time) : mID(id), mImageSize(imagesize), mBodySize(bodysize), mTime(time) {} void init(const LLUUID& id, U32 time) { mID = id, mImageSize = 0; mBodySize = 0; mTime = time; } -- cgit v1.2.3 From 6d68de504f7ffd356f465916fe8bac26de47d5ae Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:58:58 -0800 Subject: CID-355 Checker: UNINIT_CTOR Function: LLVOVolume::LLVOVolume(const LLUUID &, unsigned char, LLViewerRegion *) File: /indra/newview/llvovolume.cpp --- indra/newview/llvovolume.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 295c0c8010..bfe38c14ba 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -180,8 +180,10 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mRelativeXform.setIdentity(); mRelativeXformInvTrans.setIdentity(); + mFaceMappingChanged = FALSE; mLOD = MIN_LOD; mTextureAnimp = NULL; + mVolumeChanged = FALSE; mVObjRadius = LLVector3(1,1,0.5f).length(); mNumFaces = 0; mLODChanged = FALSE; -- cgit v1.2.3 From 6e55c9549a31550b7dc73972462334c8b1e32f7c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 17:01:02 -0800 Subject: CID-354 Checker: UNINIT_CTOR Function: LLViewerJointMesh::LLViewerJointMesh() File: /indra/newview/llviewerjointmesh.cpp --- indra/newview/llviewerjointmesh.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 5b8902dec4..1a67fc0966 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -147,6 +147,7 @@ LLViewerJointMesh::LLViewerJointMesh() mTexture( NULL ), mLayerSet( NULL ), mTestImageName( 0 ), + mFaceIndexCount(0), mIsTransparent(FALSE) { -- cgit v1.2.3 From e48e9db756f55f1834256abfcc37038799cca8c0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 17:04:43 -0800 Subject: CID-353 Checker: UNINIT_CTOR Function: LLViewerJoint::LLViewerJoint() File: /indra/newview/llviewerjoint.cpp --- indra/newview/llviewerjoint.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index c2591ac8d7..c425d95ff8 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -66,6 +66,7 @@ LLViewerJoint::LLViewerJoint() mMinPixelArea = DEFAULT_LOD; mPickName = PN_DEFAULT; mVisible = TRUE; + mMeshID = 0; } -- cgit v1.2.3 From 0d2ce43c545b40a3ce5a90bc894b79ae8b11b726 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 17:06:49 -0800 Subject: CID-348 Checker: UNINIT_CTOR Function: LLViewerShaderMgr::LLViewerShaderMgr() File: /indra/newview/llviewershadermgr.cpp --- indra/newview/llviewershadermgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 6dc9f5c465..86b1a8c910 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -135,7 +135,8 @@ LLGLSLShader gLuminanceGatherProgram; GLint gAvatarMatrixParam; LLViewerShaderMgr::LLViewerShaderMgr() : - mVertexShaderLevel(SHADER_COUNT, 0) + mVertexShaderLevel(SHADER_COUNT, 0), + mMaxAvatarShaderLevel(0) { /// Make sure WL Sky is the first program mShaderList.push_back(&gWLSkyProgram); -- cgit v1.2.3 From 52bd13e1f5cd661ff359e36be8c0496d06c19d1c Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 27 Jan 2010 17:21:16 -0800 Subject: Fix for broken mac build (surplus comma in the LLToolBar constructor initializers). --- indra/newview/lltoolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 6df574a21a..e7dc7ae522 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -100,7 +100,7 @@ LLToolBar::LLToolBar() mInventoryAutoOpen(FALSE), mNumUnreadIMs(0) #if LL_DARWIN - , mResizeHandle(NULL), + , mResizeHandle(NULL) #endif // LL_DARWIN { setIsChrome(TRUE); -- cgit v1.2.3