diff options
26 files changed, 143 insertions, 90 deletions
diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h index 85ab035e61..38617bd6d4 100644 --- a/indra/llcharacter/llbvhloader.h +++ b/indra/llcharacter/llbvhloader.h @@ -166,6 +166,7 @@ public: Translation() { mIgnore = FALSE; + mIgnorePositions = FALSE; mRelativePositionKey = FALSE; mRelativeRotationKey = FALSE; mPriorityModifier = 0; diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 37afcb7cda..5c49214051 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -70,6 +70,7 @@ LLJoint::LLJoint(const std::string &name, LLJoint *parent) mXform.setScaleChildOffset(TRUE); mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; + mUpdateXform = FALSE; mJointNum = 0; setName(name); diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index b5817e5bde..461309bee9 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -58,11 +58,15 @@ const F32 MAX_ROLL = 0.6f; // LLKeyframeWalkMotion() // Class Constructor //----------------------------------------------------------------------------- -LLKeyframeWalkMotion::LLKeyframeWalkMotion(const LLUUID &id) : LLKeyframeMotion(id) +LLKeyframeWalkMotion::LLKeyframeWalkMotion(const LLUUID &id) + : LLKeyframeMotion(id), + + mCharacter(NULL), + mCyclePhase(0.0f), + mRealTimeLast(0.0f), + mAdjTimeLast(0.0f), + mDownFoot(0) { - mRealTimeLast = 0.0f; - mAdjTimeLast = 0.0f; - mCharacter = NULL; } diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 73c6951211..e6fa4d7985 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -54,6 +54,7 @@ bool operator!=(const LLUniqueID &a, const LLUniqueID &b) //----------------------------------------------------------------------------- LLStateDiagram::LLStateDiagram() { + mDefaultState = NULL; mUseDefaultState = FALSE; } @@ -305,6 +306,7 @@ LLStateMachine::LLStateMachine() // we haven't received a starting state yet mCurrentState = NULL; mLastState = NULL; + mLastTransition = NULL; mStateDiagram = NULL; } diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp index 9e7e043761..f6e41eecb4 100644 --- a/indra/llinventory/llnotecard.cpp +++ b/indra/llinventory/llnotecard.cpp @@ -35,7 +35,9 @@ #include "llstreamtools.h" LLNotecard::LLNotecard(S32 max_text) -: mMaxText(max_text) + : mMaxText(max_text), + mVersion(0), + mEmbeddedVersion(0) { } diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index 104629c157..00e77d20e9 100644 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp @@ -175,7 +175,8 @@ void LLAres::rewriteURI(const std::string &uri, UriRewriteResponder *resp) LLQueryResponder::LLQueryResponder() : LLAres::QueryResponder(), - mResult(ARES_ENODATA) + mResult(ARES_ENODATA), + mType(RES_INVALID) { } @@ -641,8 +642,10 @@ LLPtrRecord::LLPtrRecord(const std::string &name, unsigned ttl) } LLAddrRecord::LLAddrRecord(LLResType type, const std::string &name, - unsigned ttl) - : LLDnsRecord(type, name, ttl) + unsigned ttl) + : LLDnsRecord(type, name, ttl), + + mSize(0) { } @@ -701,7 +704,11 @@ bail: } LLSrvRecord::LLSrvRecord(const std::string &name, unsigned ttl) - : LLHostRecord(RES_SRV, name, ttl) + : LLHostRecord(RES_SRV, name, ttl), + + mPriority(0), + mWeight(0), + mPort(0) { } diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index dbec2816c8..9363b3a8d5 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -81,6 +81,8 @@ public: }; LLCacheNameEntry::LLCacheNameEntry() + : mIsGroup(false), + mCreateTime(0) { } diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 49dbdbd56d..1980735bbb 100644 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -126,8 +126,9 @@ LLHTTPAssetRequest::LLHTTPAssetRequest(LLHTTPAssetStorage *asp, const std::string& url, CURLM *curl_multi) : LLAssetRequest(uuid, type), - mZInitialized(false) + mZInitialized(false) { + memset(&mZStream, 0, sizeof(mZStream)); // we'll initialize this later, but for now zero the whole C-style struct to avoid debug/coverity noise mAssetStoragep = asp; mCurlHandle = NULL; mCurlMultiHandle = curl_multi; diff --git a/indra/llmessage/llhttpnode.h b/indra/llmessage/llhttpnode.h index 915aacb7cc..8212f58653 100644 --- a/indra/llmessage/llhttpnode.h +++ b/indra/llmessage/llhttpnode.h @@ -305,7 +305,7 @@ protected: ~LLSimpleResponse(); private: - LLSimpleResponse() {;} // Must be accessed through LLPointer. + LLSimpleResponse() : mCode(0) {} // Must be accessed through LLPointer. }; std::ostream& operator<<(std::ostream& out, const LLSimpleResponse& resp); diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp index 3da41939fa..a9e1ee77ef 100644 --- a/indra/llmessage/llinstantmessage.cpp +++ b/indra/llmessage/llinstantmessage.cpp @@ -68,9 +68,11 @@ const S32 IM_TTL = 1; * LLIMInfo */ LLIMInfo::LLIMInfo() : + mFromGroup(FALSE), mParentEstateID(0), mOffline(0), mViewerThinksToIsOnline(false), + mIMType(IM_NOTHING_SPECIAL), mTimeStamp(0), mSource(IM_FROM_SIM), mTTL(IM_TTL) diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 97134bd336..27530fbfe1 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -74,7 +74,12 @@ class LLHTTPPipe : public LLIOPipe { public: LLHTTPPipe(const LLHTTPNode& node) - : mNode(node), mResponse(NULL), mState(STATE_INVOKE), mChainLock(0), mStatusCode(0) + : mNode(node), + mResponse(NULL), + mState(STATE_INVOKE), + mChainLock(0), + mLockedPump(NULL), + mStatusCode(0) { } virtual ~LLHTTPPipe() { @@ -111,7 +116,7 @@ private: void nullPipe(); private: - Response() {;} // Must be accessed through LLPointer. + Response() : mPipe(NULL) {} // Must be accessed through LLPointer. LLHTTPPipe* mPipe; }; friend class Response; @@ -403,7 +408,7 @@ void LLHTTPPipe::unlockChain() class LLHTTPResponseHeader : public LLIOPipe { public: - LLHTTPResponseHeader() {} + LLHTTPResponseHeader() : mCode(0) {} virtual ~LLHTTPResponseHeader() {} protected: diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index d7f02ebd85..8abc0aaab2 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -82,7 +82,7 @@ protected: class LLMsgBlkData { public: - LLMsgBlkData(const char *name, S32 blocknum) : mOffset(-1), mBlockNumber(blocknum), mTotalSize(-1) + LLMsgBlkData(const char *name, S32 blocknum) : mBlockNumber(blocknum), mTotalSize(-1) { mName = (char *)name; } @@ -108,7 +108,6 @@ public: temp->addData(data, size, type, data_size); } - S32 mOffset; S32 mBlockNumber; typedef LLDynamicArrayIndexed<LLMsgVarData, const char *, 8> msg_var_data_map_t; msg_var_data_map_t mMemberVarData; @@ -136,7 +135,6 @@ public: void addDataFast(char *blockname, char *varname, const void *data, S32 size, EMsgVariableType type, S32 data_size = -1); public: - S32 mOffset; typedef std::map<char*, LLMsgBlkData*> msg_blk_data_map_t; msg_blk_data_map_t mMemberBlocks; char *mName; diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index 8404f6519d..7aa833ee32 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -74,6 +74,7 @@ void LLXfer::init (S32 chunk_size) mCallback = NULL; mCallbackDataHandle = NULL; + mCallbackResult = 0; mBufferContainsEOF = FALSE; mBuffer = NULL; diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index e56d818d65..916006bc2d 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -253,6 +253,8 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, { init(); + mSendSize = 0; + mSystemVersionMajor = version_major; mSystemVersionMinor = version_minor; mSystemVersionPatch = version_patch; @@ -323,6 +325,8 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, mMaxMessageTime = 1.f; mTrueReceiveSize = 0; + + mReceiveTime = 0.f; } diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index cfb3572d84..2f9e59accb 100644 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -144,6 +144,8 @@ LLPartSysCompressedPacket::LLPartSysCompressedPacket() mData[i] = '\0'; } + mNumBytes = 0; + gSetInitDataDefaults(&mDefaults); } diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp index 18787c47c5..774a58c8ac 100644 --- a/indra/llprimitive/llmaterialtable.cpp +++ b/indra/llprimitive/llmaterialtable.cpp @@ -92,6 +92,9 @@ F32 const LLMaterialTable::DEFAULT_FRICTION = 0.5f; F32 const LLMaterialTable::DEFAULT_RESTITUTION = 0.4f; LLMaterialTable::LLMaterialTable() + : mCollisionSoundMatrix(NULL), + mSlidingSoundMatrix(NULL), + mRollingSoundMatrix(NULL) { } diff --git a/indra/llprimitive/llmaterialtable.h b/indra/llprimitive/llmaterialtable.h index 2c0b046fa7..77f29a8e06 100644 --- a/indra/llprimitive/llmaterialtable.h +++ b/indra/llprimitive/llmaterialtable.h @@ -38,6 +38,8 @@ #include <list> +class LLMaterialInfo; + const U32 LLMATERIAL_INFO_NAME_LENGTH = 256; // We've moved toward more reasonable mass values for the Havok4 engine. @@ -64,45 +66,6 @@ const F32 LEGACY_DEFAULT_OBJECT_DENSITY = 10.0f; const F32 DEFAULT_AVATAR_DENSITY = 445.3f; // was 444.24f; -class LLMaterialInfo -{ -public: - U8 mMCode; - std::string mName; - LLUUID mDefaultTextureID; - LLUUID mShatterSoundID; - F32 mDensity; // kg/m^3 - F32 mFriction; - F32 mRestitution; - - // damage and energy constants - F32 mHPModifier; // modifier on mass based HP total - F32 mDamageModifier; // modifier on KE based damage - F32 mEPModifier; // modifier on mass based EP total - - LLMaterialInfo(U8 mcode, const std::string& name, const LLUUID &uuid) - { - init(mcode,name,uuid); - }; - - void init(U8 mcode, const std::string& name, const LLUUID &uuid) - { - mDensity = 1000.f; // default to 1000.0 (water) - mHPModifier = 1.f; - mDamageModifier = 1.f; - mEPModifier = 1.f; - - mMCode = mcode; - mName = name; - mDefaultTextureID = uuid; - }; - - ~LLMaterialInfo() - { - }; - -}; - class LLMaterialTable { public: @@ -185,5 +148,47 @@ public: static LLMaterialTable basic; }; + +class LLMaterialInfo +{ +public: + U8 mMCode; + std::string mName; + LLUUID mDefaultTextureID; + LLUUID mShatterSoundID; + F32 mDensity; // kg/m^3 + F32 mFriction; + F32 mRestitution; + + // damage and energy constants + F32 mHPModifier; // modifier on mass based HP total + F32 mDamageModifier; // modifier on KE based damage + F32 mEPModifier; // modifier on mass based EP total + + LLMaterialInfo(U8 mcode, const std::string& name, const LLUUID &uuid) + { + init(mcode,name,uuid); + }; + + void init(U8 mcode, const std::string& name, const LLUUID &uuid) + { + mDensity = 1000.f; // default to 1000.0 (water) + mFriction = LLMaterialTable::DEFAULT_FRICTION; + mRestitution = LLMaterialTable::DEFAULT_RESTITUTION; + mHPModifier = 1.f; + mDamageModifier = 1.f; + mEPModifier = 1.f; + + mMCode = mcode; + mName = name; + mDefaultTextureID = uuid; + }; + + ~LLMaterialInfo() + { + }; + +}; + #endif diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 786dc64452..59e7d890f4 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -91,14 +91,15 @@ LLFontManager::~LLFontManager() LLFontGlyphInfo::LLFontGlyphInfo(U32 index) : mGlyphIndex(index), + mWidth(0), // In pixels + mHeight(0), // In pixels + mXAdvance(0.f), // In pixels + mYAdvance(0.f), // In pixels mXBitmapOffset(0), // Offset to the origin in the bitmap mYBitmapOffset(0), // Offset to the origin in the bitmap mXBearing(0), // Distance from baseline to left in pixels mYBearing(0), // Distance from baseline to top in pixels - mWidth(0), // In pixels - mHeight(0), // In pixels - mXAdvance(0.f), // In pixels - mYAdvance(0.f) // In pixels + mBitmapNum(0) // Which bitmap in the bitmap cache contains this glyph { } @@ -112,6 +113,7 @@ LLFontFreetype::LLFontFreetype() mFTFace(NULL), mRenderGlyphCount(0), mAddGlyphCount(0), + mStyle(0), mPointSize(0) { } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 035ca3f26b..5816cef6af 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -283,6 +283,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodeP } LLNotificationForm::LLNotificationForm(const LLSD& sd) + : mIgnore(IGNORE_NO) { if (sd.isArray()) { diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 6fec1d3e10..bc97cf3df2 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -33,7 +33,7 @@ LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& defa return LLUIColor(); } -LLUIColor::LLUIColor() {} +LLUIColor::LLUIColor() : mColorPtr(NULL) {} namespace tut { diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp index f9dfee931b..24a32de268 100644 --- a/indra/llui/tests/llurlmatch_test.cpp +++ b/indra/llui/tests/llurlmatch_test.cpp @@ -25,6 +25,7 @@ // link seam LLUIColor::LLUIColor() + : mColorPtr(NULL) {} namespace tut diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 4c050844f8..d908c85da6 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -85,7 +85,8 @@ namespace LLInitParam // BaseBlock::BaseBlock() : mLastChangedParam(0), - mChangeVersion(0) + mChangeVersion(0), + mBlockDescriptor(NULL) {} BaseBlock::~BaseBlock() diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 7e1e4a3d21..a84e47f998 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -321,13 +321,13 @@ namespace LLInitParam typedef bool(*validation_func_t)(const Param*); ParamDescriptor(param_handle_t p, - merge_func_t merge_func, - deserialize_func_t deserialize_func, - serialize_func_t serialize_func, - validation_func_t validation_func, - inspect_func_t inspect_func, - S32 min_count, - S32 max_count) + merge_func_t merge_func, + deserialize_func_t deserialize_func, + serialize_func_t serialize_func, + validation_func_t validation_func, + inspect_func_t inspect_func, + S32 min_count, + S32 max_count) : mParamHandle(p), mMergeFunc(merge_func), mDeserializeFunc(deserialize_func), @@ -336,6 +336,7 @@ namespace LLInitParam mInspectFunc(inspect_func), mMinCount(min_count), mMaxCount(max_count), + mGeneration(0), mNumRefs(0) {} @@ -371,7 +372,8 @@ namespace LLInitParam public: BlockDescriptor() : mMaxParamOffset(0), - mInitializationState(UNINITIALIZED) + mInitializationState(UNINITIALIZED), + mCurrentBlockPtr(NULL) {} typedef enum e_initialization_state diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 39e71974fd..bf1e307d71 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -910,16 +910,19 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l tooltip_msg.append( nodep->mName ); } + bool has_media = false; bool is_time_based_media = false; bool is_web_based_media = false; bool is_media_playing = false; + bool is_media_displaying = false; // Does this face have media? const LLTextureEntry* tep = hover_object->getTE(mHoverPick.mObjectFace); if(tep) { - const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; + has_media = tep->hasMedia(); + const LLMediaEntry* mep = has_media ? tep->getMediaData() : NULL; if (mep) { viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); @@ -927,33 +930,38 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l if (media_impl.notNull() && (media_impl->hasMedia())) { + is_media_displaying = true; LLStringUtil::format_map_t args; media_plugin = media_impl->getMediaPlugin(); if(media_plugin) - { if(media_plugin->pluginSupportsMediaTime()) - { - is_time_based_media = true; - is_web_based_media = false; - //args["[CurrentURL]"] = media_impl->getMediaURL(); - is_media_playing = media_impl->isMediaPlaying(); - } - else - { - is_time_based_media = false; - is_web_based_media = true; - //args["[CurrentURL]"] = media_plugin->getLocation(); - } + { + if(media_plugin->pluginSupportsMediaTime()) + { + is_time_based_media = true; + is_web_based_media = false; + //args["[CurrentURL]"] = media_impl->getMediaURL(); + is_media_playing = media_impl->isMediaPlaying(); + } + else + { + is_time_based_media = false; + is_web_based_media = true; + //args["[CurrentURL]"] = media_plugin->getLocation(); + } //tooltip_msg.append(LLTrans::getString("CurrentURL", args)); } } } } + // Avoid showing tip over media that's displaying // also check the primary node since sometimes it can have an action even though // the root node doesn't - bool needs_tip = needs_tooltip(nodep) || - needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()); + bool needs_tip = !is_media_displaying && + (has_media || + needs_tooltip(nodep) || + needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode())); if (show_all_object_tips || needs_tip) { diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 7b28a3b72c..f7ac5361c5 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -56,9 +56,9 @@ void LLLogin::disconnect() //----------------------------------------------------------------------------- #include "../llviewernetwork.h" -unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'}; /* Flawfinder: ignore */ +unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'}; -LLViewerLogin::LLViewerLogin() {} +LLViewerLogin::LLViewerLogin() : mGridChoice(GRID_INFO_NONE) {} LLViewerLogin::~LLViewerLogin() {} void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const { diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 297d98ad8d..dd61ac6ae5 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -87,8 +87,6 @@ public: __attribute__ ((noinline)) #endif BOOL isGodlike() const { return FALSE; } -private: - int dummy; }; LLAgent gAgent; |