[Bluetooth] Changes to remove warning
authorLukasz Bardeli <l.bardeli@samsung.com>
Wed, 1 Jul 2015 12:45:26 +0000 (14:45 +0200)
committerLukasz Bardeli <l.bardeli@samsung.com>
Wed, 1 Jul 2015 12:45:26 +0000 (14:45 +0200)
[Verification] Code compiles without error

Change-Id: I08e57c69463d442e075450b2ba341e4dd0cba402
Signed-off-by: Lukasz Bardeli <l.bardeli@samsung.com>
src/bluetooth/bluetooth_adapter.cc
src/bluetooth/bluetooth_gatt_service.cc
src/bluetooth/bluetooth_instance.cc

index f94360bc3c773b70bfad8edc066bcbadc5930e1e..ac5f4010c3f93abf3c9ed171b830f82a8473f0da 100755 (executable)
@@ -341,8 +341,8 @@ BluetoothAdapter::BluetoothAdapter(BluetoothInstance& instance) :
     is_visible_(false),
     is_powered_(false),
     is_initialized_(false),
-    instance_(instance),
-    user_request_list_()
+    user_request_list_(),
+    instance_(instance)
 {
   LoggerD("Entered");
   if (BT_ERROR_NONE == bt_initialize()) {
index d9bc8183269327c0435b639e985de76b428bd405..d4c29e559db388f013ac10465478209cfacecd25 100755 (executable)
@@ -341,7 +341,7 @@ void BluetoothGATTService::ReadValue(const picojson::value& args,
       if (BT_ERROR_NONE != ret) {
         plarform_res = util::GetBluetoothError(ret, "Error while getting value");
       } else {
-        for (size_t i = 0 ; i < length; i++) {
+        for (int i = 0 ; i < length; i++) {
           byte_array_obj.push_back(picojson::value(std::to_string(value[i])));
         }
       }
@@ -388,7 +388,7 @@ void BluetoothGATTService::WriteValue(const picojson::value& args,
 
   int value_size = value_array.size();
   std::unique_ptr<char[]> value_data(new char[value_size]);
-  for (size_t i = 0; i < value_size; ++i) {
+  for (int i = 0; i < value_size; ++i) {
     value_data[i] = static_cast<char>(value_array[i].get<double>());
   }
 
@@ -510,7 +510,7 @@ void BluetoothGATTService::OnCharacteristicValueChanged(
   picojson::value byte_array = picojson::value(picojson::array());
   picojson::array& byte_array_obj = byte_array.get<picojson::array>();
 
-  for (size_t i = 0 ; i < length; ++i) {
+  for (int i = 0 ; i < length; ++i) {
     byte_array_obj.push_back(picojson::value(std::to_string(value[i])));
   }
 
index b3335760ecde9968ad87fc7bbe20d973f2f0cb63..f1b7a1db8ab2320e2743bec5aa673e5674e9158a 100755 (executable)
@@ -28,8 +28,8 @@ using namespace common;
 BluetoothInstance::BluetoothInstance() :
     bluetooth_adapter_(*this),
     bluetooth_device_(bluetooth_adapter_),
-    bluetooth_health_profile_handler_(*this),
     bluetooth_health_application_(bluetooth_health_profile_handler_),
+    bluetooth_health_profile_handler_(*this),
     bluetooth_service_handler_(bluetooth_adapter_),
     bluetooth_socket_(bluetooth_adapter_),
     bluetooth_le_adapter_(*this),
@@ -172,11 +172,6 @@ BluetoothInstance::~BluetoothInstance()
 namespace {
 const char* JSON_CALLBACK_ID = "callbackId";
 const char* JSON_LISTENER_ID = "listenerId";
-const char* JSON_STATUS = "status";
-const char* JSON_RESULT = "result";
-const char* JSON_CALLBACK_SUCCCESS = "success";
-const char* JSON_CALLBACK_ERROR = "error";
-const char* JSON_DATA = "args";
 } // namespace
 
 void BluetoothInstance::AsyncResponse(double callback_handle, const std::shared_ptr<picojson::value>& response) {