From 326d42647ffe8767d97ca60f147c3f6db5213a65 Mon Sep 17 00:00:00 2001 From: Ankur Date: Wed, 17 Dec 2014 16:41:59 +0530 Subject: [PATCH] Fixed Intialization Warnings -Reordered some variable intializations to remove warnings related to order of initializations. Change-Id: Ibf56efd6f19c11229a18fbe6a613ffcf2b172a16 --- src/geo/geo_sensor_hal.cpp | 6 +++--- src/libsensord/csensor_event_listener.cpp | 2 +- src/linear_accel/linear_accel_sensor.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/geo/geo_sensor_hal.cpp b/src/geo/geo_sensor_hal.cpp index d742b26..21a2276 100755 --- a/src/geo/geo_sensor_hal.cpp +++ b/src/geo/geo_sensor_hal.cpp @@ -40,13 +40,13 @@ using std::ifstream; #define GAUSS_TO_UTESLA(val) ((val) * 100.0f) geo_sensor_hal::geo_sensor_hal() -: m_x(0) +: m_polling_interval(POLL_1HZ_MS) +, m_x(0) , m_y(0) , m_z(0) , m_hdst(0) -, m_node_handle(-1) -, m_polling_interval(POLL_1HZ_MS) , m_fired_time(INITIAL_TIME) +, m_node_handle(-1) { const string sensorhub_interval_node_name = "mag_poll_delay"; csensor_config &config = csensor_config::get_instance(); diff --git a/src/libsensord/csensor_event_listener.cpp b/src/libsensord/csensor_event_listener.cpp index e093f21..78e705e 100755 --- a/src/libsensord/csensor_event_listener.cpp +++ b/src/libsensord/csensor_event_listener.cpp @@ -30,8 +30,8 @@ using std::pair; csensor_event_listener::csensor_event_listener() : m_client_id(CLIENT_ID_INVALID) -, m_thread_state(THREAD_STATE_TERMINATE) , m_poller(NULL) +, m_thread_state(THREAD_STATE_TERMINATE) , m_hup_observer(NULL) { } diff --git a/src/linear_accel/linear_accel_sensor.cpp b/src/linear_accel/linear_accel_sensor.cpp index f975733..96e6cce 100755 --- a/src/linear_accel/linear_accel_sensor.cpp +++ b/src/linear_accel/linear_accel_sensor.cpp @@ -53,8 +53,8 @@ #define LINEAR_ACCEL_ENABLED 3 linear_accel_sensor::linear_accel_sensor() -: m_gravity_sensor(NULL) -, m_accel_sensor(NULL) +: m_accel_sensor(NULL) +, m_gravity_sensor(NULL) , m_x(INITIAL_VALUE) , m_y(INITIAL_VALUE) , m_z(INITIAL_VALUE) -- 2.7.4