sensord: remove compiler warnings 04/58604/1
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 2 Feb 2016 07:14:43 +0000 (16:14 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Tue, 2 Feb 2016 07:14:43 +0000 (16:14 +0900)
* type has to be signed int
* change void * to char * when it uses for arithmetic

Change-Id: Ib6be183729a0208efbb3ab8249ad94f277446846
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/client/client_common.h
src/client/sensor_event_listener.cpp
src/server/sensor_event_dispatcher.cpp

index 7c6ae30..ef3b645 100644 (file)
@@ -47,7 +47,7 @@ struct log_attr {
 
 struct log_element {
        log_id id;
-       unsigned int type;
+       int type;
        struct log_attr log_attr;
 };
 
index 52dada1..f5c2cf4 100644 (file)
@@ -183,7 +183,7 @@ void sensor_event_listener::handle_events(void* event)
        } else {
                sensor_event_t *sensor_event = (sensor_event_t *)event;
                sensor_id = sensor_event->sensor_id;
-               sensor_event->data = (sensor_data_t *)((void *)sensor_event + sizeof(sensor_event_t));
+               sensor_event->data = (sensor_data_t *)((char *)sensor_event + sizeof(sensor_event_t));
                sensor_data = sensor_event->data;
                cur_time = sensor_event->data->timestamp;
                accuracy = sensor_event->data->accuracy;
index 50e40f3..25b1ad2 100644 (file)
@@ -214,7 +214,7 @@ void sensor_event_dispatcher::send_sensor_events(vector< pair<void*, int> > &eve
                }
 
                memcpy(event, sensor_events, sizeof(sensor_event_t));
-               memcpy(event + sizeof(sensor_event_t), sensor_events->data, sensor_events->data_length);
+               memcpy((char *)event + sizeof(sensor_event_t), sensor_events->data, sensor_events->data_length);
 
                id_vec.clear();
                client_info_manager.get_listener_ids(sensor_id, event_type, id_vec);