diff options
author | Boram Bae <boram21.bae@samsung.com> | 2020-03-13 11:21:26 +0900 |
---|---|---|
committer | Boram Bae <boram21.bae@samsung.com> | 2020-03-13 11:21:26 +0900 |
commit | 34e9b9ba5fc23f6d9ff2427c0e611511dfc51b80 (patch) | |
tree | 347fac003647cc12f53d52b69188833b79bdc1bb | |
parent | 8c4de94031631876c1ffe4c44bd5e6f07c9d0aeb (diff) | |
download | sensor-tw3-34e9b9ba5fc23f6d9ff2427c0e611511dfc51b80.tar.gz sensor-tw3-34e9b9ba5fc23f6d9ff2427c0e611511dfc51b80.tar.bz2 sensor-tw3-34e9b9ba5fc23f6d9ff2427c0e611511dfc51b80.zip |
Fix svace issues
Change-Id: I433d23c1ecd8bb1e6f781c7aa199a0de9f53a254
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
-rw-r--r-- | src/sensorhub/sensorhub_controller.cpp | 5 | ||||
-rw-r--r-- | src/sensorhub/sensorhub_sensor.h | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/sensorhub/sensorhub_controller.cpp b/src/sensorhub/sensorhub_controller.cpp index 1b8e4bc..2df8fc0 100644 --- a/src/sensorhub/sensorhub_controller.cpp +++ b/src/sensorhub/sensorhub_controller.cpp @@ -53,6 +53,11 @@ sensorhub_controller::sensorhub_controller() m_pending_data.value_count = 0; memset(m_pending_data.values, 0, sizeof(m_pending_data.values)); + m_data.accuracy = SENSOR_ACCURACY_UNDEFINED; + m_data.timestamp = 0; + m_data.value_count = 0; + memset(m_data.values, 0, sizeof(m_data.values)); + /* initialize polling node */ m_poll_node = open_input_node(SSP_INPUT_NODE_NAME); if (m_poll_node < 0) diff --git a/src/sensorhub/sensorhub_sensor.h b/src/sensorhub/sensorhub_sensor.h index edc1a0d..672f5eb 100644 --- a/src/sensorhub/sensorhub_sensor.h +++ b/src/sensorhub/sensorhub_sensor.h @@ -67,16 +67,16 @@ public: sensor_attribute_str_vec attributes_str; protected: - const sensor_info_t *m_sensor_info; - sensorhub_controller *m_controller; + const sensor_info_t *m_sensor_info{nullptr}; + sensorhub_controller *m_controller{nullptr}; bool enable(bool enbl, const char lib_id); bool is_enabled(void); bool is_restore_mode(void); private: - std::atomic_bool m_enabled; - std::atomic_bool m_restore_mode; + std::atomic_bool m_enabled{false}; + std::atomic_bool m_restore_mode{false}; }; #endif /* _SENSORHUB_SENSOR_H_ */ |