-In client.cpp, the variable was an index for 'for' loop, and was always positive, so can be changed on unsigned.
-In sensor_plugin_loader.cpp, the variable was intialized with a variable which was unsigned int, and later was right shifted
which will remain positive, so can be changed to unsigned int
Change-Id: I9efeea4c4a90186378eefbe24f76eb945ae9a3db
*list = (sensor_t *) malloc(sizeof(sensor_info *) * sensor_infos.size());
retvm_if(!*list, false, "Failed to allocate memory");
- for (int i = 0; i < sensor_infos.size(); ++i)
+ for (unsigned int i = 0; i < sensor_infos.size(); ++i)
*(*list + i) = sensor_info_to_sensor(sensor_infos[i]);
*sensor_count = sensor_infos.size();
vector<sensor_base *> sensors;
sensor_type_t type = (sensor_type_t) (id & SENSOR_TYPE_MASK);
- int index = id >> SENSOR_INDEX_SHIFT;
+ unsigned int index = id >> SENSOR_INDEX_SHIFT;
sensors = get_sensors(type);