Skip to content

Commit

Permalink
Coverity issues:
Browse files Browse the repository at this point in the history
129727: Structurally dead code
151979, 133461: Uninitialized scalar field
129785, 129786, 129787: Use after free
  • Loading branch information
wwmayer committed Aug 16, 2016
1 parent 1855510 commit 1c80457
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/App/Application.cpp
Expand Up @@ -1012,9 +1012,9 @@ void unexpection_error_handler()
// try to throw an exception and give the user chance to save their work
#if !defined(_DEBUG)
throw Base::Exception("Unexpected error occurred! Please save your work under a new file name and restart the application!");
#endif

#else
terminate();
#endif
}

#ifdef _MSC_VER // Microsoft compiler
Expand Down
1 change: 1 addition & 0 deletions src/App/ColorModel.cpp
Expand Up @@ -56,6 +56,7 @@ ColorModel& ColorModel::operator = (const ColorModel &rclM)
return *this;

delete [] _pclColors;
_pclColors = 0;

_usColors = rclM._usColors;
if (_usColors == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/App/Expression.cpp
Expand Up @@ -773,7 +773,7 @@ class AverageCollector : public Collector {

class StdDevCollector : public Collector {
public:
StdDevCollector() : Collector() { }
StdDevCollector() : Collector(), n(0) { }

void collect(Quantity value) {
Collector::collect(value);
Expand Down
1 change: 1 addition & 0 deletions src/App/ObjectIdentifier.cpp
Expand Up @@ -470,6 +470,7 @@ ObjectIdentifier::Component::Component(const String &_component, ObjectIdentifie
, type(_type)
, index(_index)
, key(_key)
, keyIsString(false)
{
}

Expand Down

0 comments on commit 1c80457

Please sign in to comment.