Browse Source

Merge pull request #417 from dpogue/coverity

Coverity Fixes
Adam Johnson 11 years ago
parent
commit
eefa389be1
  1. 2
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp
  2. 2
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.h
  3. 2
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.cpp
  4. 2
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.h
  5. 9
      Sources/Plasma/NucleusLib/pnEncryption/plChecksum.cpp

2
Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp

@ -559,7 +559,7 @@ void pyGUIControlMultiLineEdit::DeleteLinesFromTop( int lines )
}
}
uint32_t pyGUIControlMultiLineEdit::GetFontSize()
uint32_t pyGUIControlMultiLineEdit::GetFontSize() const
{
if (fGCkey)
{

2
Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.h

@ -111,7 +111,7 @@ public:
virtual void DeleteLinesFromTop( int lines );
virtual uint32_t GetFontSize();
virtual uint32_t GetFontSize() const;
virtual void SetFontSize( uint32_t fontsize );
};

2
Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.cpp

@ -146,7 +146,7 @@ void pyGUIControlTextBox::SetForeColor( pyColor& color )
}
PyObject* pyGUIControlTextBox::GetForeColor()
PyObject* pyGUIControlTextBox::GetForeColor() const
{
if ( fGCkey )
{

2
Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.h

@ -88,7 +88,7 @@ public:
virtual void SetJustify( uint8_t justify );
virtual uint8_t GetJustify();
virtual PyObject* GetForeColor(); // returns pyColor
virtual PyObject* GetForeColor() const; // returns pyColor
};
#endif // _pyGUIControlTextBox_h_

9
Sources/Plasma/NucleusLib/pnEncryption/plChecksum.cpp

@ -119,6 +119,7 @@ plMD5Checksum::plMD5Checksum()
plMD5Checksum::plMD5Checksum(const plMD5Checksum& rhs)
{
memset(&fContext, 0, sizeof(fContext));
memcpy(fChecksum, rhs.fChecksum, sizeof(fChecksum));
fValid = rhs.fValid;
}
@ -135,6 +136,7 @@ plMD5Checksum::plMD5Checksum( hsStream* stream )
void plMD5Checksum::Clear()
{
memset(&fContext, 0, sizeof(fContext));
memset(fChecksum, 0, sizeof(fChecksum));
fValid = false;
}
@ -182,6 +184,7 @@ void plMD5Checksum::Finish()
{
MD5_Final(fChecksum, &fContext);
fValid = true;
memset(&fContext, 0, sizeof(fContext));
}
const char* plMD5Checksum::GetAsHexString() const
@ -245,6 +248,7 @@ plSHAChecksum::plSHAChecksum()
plSHAChecksum::plSHAChecksum(const plSHAChecksum& rhs)
{
memset(&fContext, 0, sizeof(fContext));
memcpy(fChecksum, rhs.fChecksum, sizeof(fChecksum));
fValid = rhs.fValid;
}
@ -261,6 +265,7 @@ plSHAChecksum::plSHAChecksum(hsStream* stream)
void plSHAChecksum::Clear()
{
memset(&fContext, 0, sizeof(fContext));
memset(fChecksum, 0, sizeof(fChecksum));
fValid = false;
}
@ -310,6 +315,7 @@ void plSHAChecksum::Finish()
{
SHA_Final(fChecksum, &fContext);
fValid = true;
memset(&fContext, 0, sizeof(fContext));
}
const char* plSHAChecksum::GetAsHexString() const
@ -371,6 +377,7 @@ plSHA1Checksum::plSHA1Checksum()
plSHA1Checksum::plSHA1Checksum(const plSHA1Checksum& rhs)
{
memset(&fContext, 0, sizeof(fContext));
memcpy(fChecksum, rhs.fChecksum, sizeof(fChecksum));
fValid = rhs.fValid;
}
@ -389,6 +396,7 @@ void plSHA1Checksum::Clear()
{
memset(fChecksum, 0, sizeof(fChecksum));
fValid = false;
memset(&fContext, 0, sizeof(fContext));
}
void plSHA1Checksum::CalcFromFile(const plFileName& fileName)
@ -436,6 +444,7 @@ void plSHA1Checksum::Finish()
{
SHA1_Final(fChecksum, &fContext);
fValid = true;
memset(&fContext, 0, sizeof(fContext));
}
const char* plSHA1Checksum::GetAsHexString() const

Loading…
Cancel
Save