diff --git a/Engine/source/console/astNodes.cpp b/Engine/source/console/astNodes.cpp index 876a4383a..51bde9d61 100644 --- a/Engine/source/console/astNodes.cpp +++ b/Engine/source/console/astNodes.cpp @@ -142,6 +142,7 @@ StmtNode::StmtNode() { mNext = NULL; dbgFileName = CodeBlock::smCurrentParser->getCurrentFile(); + dbgLineNumber = 0; } void StmtNode::setPackage(StringTableEntry) diff --git a/Engine/source/console/codeBlock.cpp b/Engine/source/console/codeBlock.cpp index f414d7473..b4dd6b2c6 100644 --- a/Engine/source/console/codeBlock.cpp +++ b/Engine/source/console/codeBlock.cpp @@ -56,6 +56,9 @@ CodeBlock::CodeBlock() name = NULL; fullPath = NULL; modPath = NULL; + codeSize = 0; + lineBreakPairCount = 0; + nextFile = NULL; } CodeBlock::~CodeBlock() diff --git a/Engine/source/console/codeInterpreter.cpp b/Engine/source/console/codeInterpreter.cpp index 186354869..838e105ef 100644 --- a/Engine/source/console/codeInterpreter.cpp +++ b/Engine/source/console/codeInterpreter.cpp @@ -224,6 +224,9 @@ CodeInterpreter::CodeInterpreter(CodeBlock *cb) : mSaveCodeBlock(nullptr), mCurrentInstruction(0) { + dMemset(&mExec, 0, sizeof(mExec)); + dMemset(&mObjectCreationStack, 0, sizeof(mObjectCreationStack)); + dMemset(&mNSDocBlockClass, 0, sizeof(mNSDocBlockClass)); } CodeInterpreter::~CodeInterpreter() diff --git a/Engine/source/console/compiler.h b/Engine/source/console/compiler.h index df69d0819..26dc93c13 100644 --- a/Engine/source/console/compiler.h +++ b/Engine/source/console/compiler.h @@ -317,7 +317,7 @@ protected: U32 addr; ///< Address to patch U32 value; ///< Value to place at addr - PatchEntry() { ; } + PatchEntry(): addr(0), value(0) { ; } PatchEntry(U32 a, U32 v) : addr(a), value(v) { ; } } PatchEntry; diff --git a/Engine/source/console/consoleInternal.cpp b/Engine/source/console/consoleInternal.cpp index 61a63ae1e..d3d838f05 100644 --- a/Engine/source/console/consoleInternal.cpp +++ b/Engine/source/console/consoleInternal.cpp @@ -475,7 +475,7 @@ Dictionary::Entry::Entry(StringTableEntry in_name) nextEntry = NULL; mUsage = NULL; mIsConstant = false; - + mNext = NULL; // NOTE: This is data inside a nameless // union, so we don't need to init the rest. value.init(); @@ -856,6 +856,7 @@ ExprEvalState::ExprEvalState() stack.reserve(64); mShouldReset = false; mResetLocked = false; + copyVariable = NULL; } ExprEvalState::~ExprEvalState() @@ -927,6 +928,15 @@ Namespace::Entry::Entry() mUsage = NULL; mHeader = NULL; mNamespace = NULL; + cb.mStringCallbackFunc = NULL; + mFunctionLineNumber = 0; + mFunctionName = StringTable->EmptyString(); + mFunctionOffset = 0; + mMinArgs = 0; + mMaxArgs = 0; + mNext = NULL; + mPackage = StringTable->EmptyString(); + mToolOnly = false; } void Namespace::Entry::clear() @@ -959,6 +969,7 @@ Namespace::Namespace() mHashSequence = 0; mRefCountToParent = 0; mClassRep = 0; + lastUsage = NULL; } Namespace::~Namespace() diff --git a/Engine/source/console/consoleInternal.h b/Engine/source/console/consoleInternal.h index d673bb39c..129da9dfb 100644 --- a/Engine/source/console/consoleInternal.h +++ b/Engine/source/console/consoleInternal.h @@ -306,6 +306,7 @@ public: nextEntry = NULL; mUsage = NULL; mIsConstant = false; + mNext = NULL; value.init(); } diff --git a/Engine/source/console/consoleObject.h b/Engine/source/console/consoleObject.h index b15cd88ab..784e294ff 100644 --- a/Engine/source/console/consoleObject.h +++ b/Engine/source/console/consoleObject.h @@ -220,7 +220,21 @@ public: : Parent( sizeof( void* ), conIdPtr, typeName ) { VECTOR_SET_ASSOCIATION( mFieldList ); - + mCategory = StringTable->EmptyString(); + mClassGroupMask = 0; + std::fill_n(mClassId, NetClassGroupsCount, -1); + mClassName = StringTable->EmptyString(); + mClassSizeof = 0; + mClassType = 0; + mDescription = StringTable->EmptyString(); +#ifdef TORQUE_NET_STATS + dMemset(mDirtyMaskFrequency, 0, sizeof(mDirtyMaskFrequency)); + dMemset(mDirtyMaskTotal, 0, sizeof(mDirtyMaskTotal)); +#endif + mDynamicGroupExpand = false; + mNamespace = NULL; + mNetEventDir = 0; + nextClass = NULL; parentClass = NULL; mIsRenderEnabled = true; mIsSelectionEnabled = true; @@ -496,6 +510,7 @@ public: validator( NULL ), setDataFn( NULL ), getDataFn( NULL ), + writeDataFn(NULL), networkMask(0) { doNotSubstitute = keepClearSubsOnly = false; diff --git a/Engine/source/console/engineAPI.h b/Engine/source/console/engineAPI.h index 78a469522..5c9d00dd4 100644 --- a/Engine/source/console/engineAPI.h +++ b/Engine/source/console/engineAPI.h @@ -1190,7 +1190,7 @@ public: ConsoleValueRef _exec(); ConsoleValueRef _execLater(SimConsoleThreadExecEvent *evt); - _BaseEngineConsoleCallbackHelper() {;} + _BaseEngineConsoleCallbackHelper(): mThis(NULL), mInitialArgc(0), mArgc(0), mCallbackName(StringTable->EmptyString()){;} }; diff --git a/Engine/source/console/engineExports.h b/Engine/source/console/engineExports.h index 7659eeac9..1303315f8 100644 --- a/Engine/source/console/engineExports.h +++ b/Engine/source/console/engineExports.h @@ -123,6 +123,7 @@ class EngineExport : public StaticEngineObject : mExportName( "" ), mExportKind( EngineExportKindScope ), mExportScope( NULL ), + mDocString(""), mNextExport( NULL ) {} }; @@ -165,7 +166,7 @@ class EngineExportScope : public EngineExport private: /// Constructor for the global scope. - EngineExportScope() {} + EngineExportScope():mExports(NULL){} }; diff --git a/Engine/source/console/engineObject.cpp b/Engine/source/console/engineObject.cpp index f82114388..ff19c1acb 100644 --- a/Engine/source/console/engineObject.cpp +++ b/Engine/source/console/engineObject.cpp @@ -53,7 +53,7 @@ void*& _USERDATA( EngineObject* object ) //----------------------------------------------------------------------------- EngineObject::EngineObject() - : mEngineObjectUserData( NULL ) + : mEngineObjectPool(NULL), mEngineObjectUserData( NULL ) { #ifdef TORQUE_DEBUG // Add to instance list. diff --git a/Engine/source/console/engineTypeInfo.cpp b/Engine/source/console/engineTypeInfo.cpp index e258696d3..14c661c82 100644 --- a/Engine/source/console/engineTypeInfo.cpp +++ b/Engine/source/console/engineTypeInfo.cpp @@ -58,6 +58,7 @@ EngineTypeInfo::EngineTypeInfo( const char* typeName, EngineExportScope* scope, mEnumTable( NULL ), mFieldTable( NULL ), mPropertyTable( NULL ), + mArgumentTypeTable(NULL), mSuperType( NULL ), mNext( smFirst ) { diff --git a/Engine/source/console/simDatablock.cpp b/Engine/source/console/simDatablock.cpp index 7944fb889..ae0fd9c63 100644 --- a/Engine/source/console/simDatablock.cpp +++ b/Engine/source/console/simDatablock.cpp @@ -55,6 +55,7 @@ ConsoleDocClass( SimDataBlock, SimDataBlock::SimDataBlock() { + modifiedKey = 0; setModDynamicFields(true); setModStaticFields(true); } diff --git a/Engine/source/console/simDictionary.cpp b/Engine/source/console/simDictionary.cpp index 4f5aac411..93491fd1c 100644 --- a/Engine/source/console/simDictionary.cpp +++ b/Engine/source/console/simDictionary.cpp @@ -31,6 +31,8 @@ SimNameDictionary::SimNameDictionary() { #ifndef USE_NEW_SIMDICTIONARY hashTable = NULL; + hashTableSize = DefaultTableSize; + hashEntryCount = 0; #endif mutex = Mutex::createMutex(); } diff --git a/Engine/source/console/simEvents.h b/Engine/source/console/simEvents.h index 362bdb325..861c7cdde 100644 --- a/Engine/source/console/simEvents.h +++ b/Engine/source/console/simEvents.h @@ -62,7 +62,7 @@ public: /// of addition to the list. SimObject *destObject; ///< Object on which this event will be applied. - SimEvent() { destObject = NULL; } + SimEvent() { nextEvent = NULL; startTime = 0; time = 0; sequenceCount = 0; destObject = NULL; } virtual ~SimEvent() {} ///< Destructor /// /// A dummy virtual destructor is required diff --git a/Engine/source/console/simFieldDictionary.h b/Engine/source/console/simFieldDictionary.h index c89bd5b57..9701f2e1d 100644 --- a/Engine/source/console/simFieldDictionary.h +++ b/Engine/source/console/simFieldDictionary.h @@ -47,7 +47,7 @@ class SimFieldDictionary public: struct Entry { - Entry() : type(NULL) {}; + Entry() : slotName(StringTable->EmptyString()), value(NULL), next(NULL), type(NULL) {}; StringTableEntry slotName; char *value; @@ -112,4 +112,4 @@ public: }; -#endif // _SIMFIELDDICTIONARY_H_ \ No newline at end of file +#endif // _SIMFIELDDICTIONARY_H_ diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index 6cf6fd029..0fc222e11 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -1380,6 +1380,7 @@ SimObject::SimObject(const SimObject& other, bool temp_clone) nextIdObject = other.nextIdObject; mGroup = other.mGroup; mFlags = other.mFlags; + mProgenitorFile = other.mProgenitorFile; mCopySource = other.mCopySource; mFieldDictionary = other.mFieldDictionary; //mIdString = other.mIdString; // special treatment (see below) diff --git a/Engine/source/console/stringStack.cpp b/Engine/source/console/stringStack.cpp index 7081756c0..96aef1c86 100644 --- a/Engine/source/console/stringStack.cpp +++ b/Engine/source/console/stringStack.cpp @@ -30,7 +30,12 @@ StringStack::StringStack() mBuffer = NULL; mArgBufferSize = 0; mArgBuffer = NULL; + for (U32 i = 0; i < MaxArgs; i++) + mArgV[i] = ""; + dMemset(mFrameOffsets, 0, sizeof(mFrameOffsets)); + dMemset(mStartOffsets, 0, sizeof(mStartOffsets)); mNumFrames = 0; + mArgc = 0; mStart = 0; mLen = 0; mStartStackSize = 0; @@ -232,6 +237,7 @@ mStackPos(0) mStack[i].init(); mStack[i].type = ConsoleValue::TypeInternalString; } + dMemset(mStackFrames, 0, sizeof(mStackFrames)); } ConsoleValueStack::~ConsoleValueStack() diff --git a/Engine/source/console/telnetConsole.cpp b/Engine/source/console/telnetConsole.cpp index 620c669bf..8eaa3b3db 100644 --- a/Engine/source/console/telnetConsole.cpp +++ b/Engine/source/console/telnetConsole.cpp @@ -88,6 +88,9 @@ TelnetConsole::TelnetConsole() mAcceptPort = -1; mClientList = NULL; mRemoteEchoEnabled = false; + + dStrncpy(mTelnetPassword, "", PasswordMaxLength); + dStrncpy(mListenPassword, "", PasswordMaxLength); } TelnetConsole::~TelnetConsole() diff --git a/Engine/source/console/telnetConsole.h b/Engine/source/console/telnetConsole.h index 96677942c..4d848a0b5 100644 --- a/Engine/source/console/telnetConsole.h +++ b/Engine/source/console/telnetConsole.h @@ -78,6 +78,7 @@ class TelnetConsole S32 state; ///< State of the client. /// @see TelnetConsole::State TelnetClient *nextClient; + TelnetClient() { dStrncpy(curLine, "", Con::MaxLineLength); curPos = 0; state = 0; nextClient = NULL; } }; TelnetClient *mClientList; TelnetConsole(); diff --git a/Engine/source/console/telnetDebugger.cpp b/Engine/source/console/telnetDebugger.cpp index 161ed5695..719ed7d32 100644 --- a/Engine/source/console/telnetDebugger.cpp +++ b/Engine/source/console/telnetDebugger.cpp @@ -163,6 +163,9 @@ TelnetDebugger::TelnetDebugger() mProgramPaused = false; mWaitForClient = false; + dStrncpy(mDebuggerPassword, "", PasswordMaxLength); + dStrncpy(mLineBuffer, "", sizeof(mLineBuffer)); + // Add the version number in a global so that // scripts can detect the presence of the // "enhanced" debugger features. diff --git a/Engine/source/console/typeValidators.h b/Engine/source/console/typeValidators.h index 9ca949fa7..c4982a781 100644 --- a/Engine/source/console/typeValidators.h +++ b/Engine/source/console/typeValidators.h @@ -27,7 +27,8 @@ class TypeValidator { public: S32 fieldIndex; - + TypeValidator() : fieldIndex(0) {} + ~TypeValidator() {} /// Prints a console error message for the validator. /// /// The message is prefaced with with: diff --git a/Engine/source/core/color.h b/Engine/source/core/color.h index afc62353e..9a21d6df2 100644 --- a/Engine/source/core/color.h +++ b/Engine/source/core/color.h @@ -203,7 +203,7 @@ public: class StockColorItem { private: - StockColorItem() {} + StockColorItem():mColorName("") {} public: StockColorItem( const char* pName, const U8 red, const U8 green, const U8 blue, const U8 alpha = 255 ) diff --git a/Engine/source/core/frameAllocator.h b/Engine/source/core/frameAllocator.h index 2e03e6fc2..98bf8b110 100644 --- a/Engine/source/core/frameAllocator.h +++ b/Engine/source/core/frameAllocator.h @@ -295,6 +295,7 @@ public: AssertFatal( count > 0, "Allocating a FrameTemp with less than one instance" ); \ mWaterMark = FrameAllocator::getWaterMark(); \ mMemory = reinterpret_cast( FrameAllocator::alloc( sizeof( type ) * count ) ); \ + mNumObjectsInMemory = 0; \ } \ template<>\ inline FrameTemp::~FrameTemp() \