Skip to content

Commit

Permalink
Fixing uninitialized pointer (from Coverity)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Cobell committed Jan 25, 2018
1 parent e4f7714 commit 8505752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addons:
notification_email: zachary.cobell@arcadis.com
build_command_prepend: cp src/tokens_template.h src/tokens.h ; cmake -DCMAKE_PREFIX_PATH=/opt/qt59/lib/cmake .
build_command: make
branch_pattern: coverity-scan
branch_pattern: master
before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END
CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
Expand Down
2 changes: 2 additions & 0 deletions src/monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Monitor::Monitor(int monitoringInterval, int nsamples, bool continuous,
this->_useUltrasonic = ultrasonicSensor;
this->_useFloat = floatSensor;
this->_useEtape = etapeSensor;
this->_ultrasonicSensor = nullptr;
this->_etapeSensor = nullptr;

if (this->_useFloat)
this->_floatSensor = new FloatSensor(this);
Expand Down

0 comments on commit 8505752

Please sign in to comment.