From: kibak.yoon Date: Tue, 12 Sep 2017 02:26:28 +0000 (+0900) Subject: sensor: hal: tw2: fix coding rule violations X-Git-Tag: submit/tizen/20170912.122922^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be20ba0d287ee8c6bb5553acb8a6c853896a732e;p=platform%2Fadaptation%2Ftw2%2Fsensor-hal-tw2.git sensor: hal: tw2: fix coding rule violations Change-Id: I6695b7d74efb6761d1208a649d8cd79640a4fa2f Signed-off-by: kibak.yoon --- diff --git a/src/gyro/gyro_device.cpp b/src/gyro/gyro_device.cpp index 70ed0e3..c5ee459 100644 --- a/src/gyro/gyro_device.cpp +++ b/src/gyro/gyro_device.cpp @@ -158,7 +158,7 @@ bool gyro_device::set_interval(uint32_t id, unsigned long val) bool gyro_device::update_value_input_event(void) { - int gyro_raw[3] = {0,}; + int gyro_raw[3] = {0, }; bool x, y, z; int read_input_cnt = 0; const int INPUT_MAX_BEFORE_SYN = 10; diff --git a/src/hrm/hrm_device.cpp b/src/hrm/hrm_device.cpp index 9f3d9d4..d00c1ad 100644 --- a/src/hrm/hrm_device.cpp +++ b/src/hrm/hrm_device.cpp @@ -166,7 +166,7 @@ bool hrm_device::update_value_input_event(void) { const float SNR_SIG_FIGS = 10000.0f; const int HR_MAX = 300; - int hrm_raw[4] = {0,}; + int hrm_raw[4] = {0, }; unsigned long long fired_time = 0; int read_input_cnt = 0; const int INPUT_MAX_BEFORE_SYN = 10; diff --git a/src/pressure/pressure_device.cpp b/src/pressure/pressure_device.cpp index 7153f99..c98c084 100644 --- a/src/pressure/pressure_device.cpp +++ b/src/pressure/pressure_device.cpp @@ -162,7 +162,7 @@ bool pressure_device::set_interval(uint32_t id, unsigned long val) bool pressure_device::update_value_input_event(void) { - int pressure_raw[3] = {0,}; + int pressure_raw[3] = {0, }; bool pressure = false; bool sea_level = false; bool temperature = false; @@ -177,7 +177,7 @@ bool pressure_device::update_value_input_event(void) while ((syn == false) && (read_input_cnt < INPUT_MAX_BEFORE_SYN)) { int len = read(m_node_handle, &pressure_event, sizeof(pressure_event)); if (len != sizeof(pressure_event)) { - _E("pressure_file read fail, read_len = %d\n",len); + _E("pressure_file read fail, read_len = %d\n", len); return false; } diff --git a/src/sensor_log.h b/src/sensor_log.h index 496786e..8ac5abb 100644 --- a/src/sensor_log.h +++ b/src/sensor_log.h @@ -29,12 +29,12 @@ #endif #define LOG_TAG "SENSOR" -#define LOG_DUMP(fp, fmt, arg...) do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while(0) +#define LOG_DUMP(fp, fmt, arg...) do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0) #ifdef _DEBUG #define DBG SLOGD #else -#define DBG(...) do{} while(0) +#define DBG(...) do { } while (0) #endif #define ERR SLOGE diff --git a/src/util.cpp b/src/util.cpp index 07532b8..1692d44 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -153,7 +153,6 @@ static bool get_input_method(const string &key, int &method, string &device_num) bool find = false; for (int i = 0; i < input_info_len; ++i) { - prefix_size = input_info[i].prefix.size(); dir = opendir(input_info[i].dir_path.c_str());