Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-libsensors: Commit

hardware/libsensors


Commit MetaInfo

Révision23c008aaadabd09696d0ff128c7362f40675875d (tree)
l'heure2019-03-13 13:31:00
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

Remove unused variables and labels

Change Summary

Modification

--- a/iio-sensors.cpp
+++ b/iio-sensors.cpp
@@ -169,10 +169,9 @@ int SensorBase::activate(bool e)
169169 return 0;
170170 }
171171
172-int SensorBase::readEvents(sensors_event_t *data, int)
172+int SensorBase::readEvents(sensors_event_t *, int)
173173 {
174174 nanosleep(&delay, 0);
175- SensorEvent *e = new (data) SensorEvent(handle, type);
176175 return 1;
177176 }
178177
--- a/w500_sensor.c
+++ b/w500_sensor.c
@@ -165,8 +165,6 @@ static int poll_data(struct sensors_poll_device_t *dev, sensors_event_t *data)
165165 struct input_event iev;
166166 struct sensor_context *ctx = (struct sensor_context *)dev;
167167 size_t res;
168- float val;
169- int i;
170168
171169 /* Orientation sensor */
172170 for (;;) {
@@ -416,7 +414,6 @@ static int open_sensors(const struct hw_module_t *module, const char* id,
416414 struct hw_device_t **device)
417415 {
418416 struct sensor_context *ctx;
419- int fd;
420417
421418 if (strcmp(id, SENSORS_HARDWARE_POLL))
422419 return -EINVAL;
@@ -448,9 +445,7 @@ static int open_sensors(const struct hw_module_t *module, const char* id,
448445
449446 return 0;
450447
451-err_light:
452448 close(ctx->accel_fd);
453-err_accel:
454449 free(ctx);
455450 return -ENOMEM;
456451 }
Afficher sur ancien navigateur de dépôt.