diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-07-16 16:18:57 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-09-01 18:41:43 +0000 |
commit | 6a9192470eceac080b9d84081dac0c98e2362fe9 (patch) | |
tree | 65ba2c27c23110748f7263743a0ae495d724c14c | |
parent | fa5f5ac98d6a03f488cf42e2bc4c7c8e75faf388 (diff) | |
download | android_hardware_invensense-6a9192470eceac080b9d84081dac0c98e2362fe9.tar.gz android_hardware_invensense-6a9192470eceac080b9d84081dac0c98e2362fe9.tar.bz2 android_hardware_invensense-6a9192470eceac080b9d84081dac0c98e2362fe9.zip |
libsensors_iio: warnings
- unused argument warning
- print format error
Change-Id: I25c3f2048d15ee70a0ae8a816c303344dce5b5ce
-rw-r--r-- | 60xx/libsensors_iio/CompassSensor.IIO.9150.cpp | 8 | ||||
-rw-r--r-- | 60xx/libsensors_iio/CompassSensor.IIO.9150.h | 2 | ||||
-rw-r--r-- | 60xx/libsensors_iio/MPLSensor.cpp | 16 | ||||
-rw-r--r-- | 60xx/libsensors_iio/SensorBase.cpp | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp b/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp index ce96564..0c8222b 100644 --- a/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp +++ b/60xx/libsensors_iio/CompassSensor.IIO.9150.cpp @@ -136,7 +136,7 @@ int CompassSensor::getFd() const * en=0, disable * @return if the operation is successful. */ -int CompassSensor::enable(int32_t handle, int en) +int CompassSensor::enable(int32_t /*handle*/, int en) { VFUNC_LOG; @@ -155,7 +155,7 @@ int CompassSensor::enable(int32_t handle, int en) return res; } -int CompassSensor::setDelay(int32_t handle, int64_t ns) +int CompassSensor::setDelay(int32_t /*handle*/, int64_t ns) { VFUNC_LOG; int tempFd; @@ -179,7 +179,7 @@ int CompassSensor::setDelay(int32_t handle, int64_t ns) @brief This function will return the state of the sensor. @return 1=enabled; 0=disabled **/ -int CompassSensor::getEnable(int32_t handle) +int CompassSensor::getEnable(int32_t /*handle*/) { VFUNC_LOG; return mEnable; @@ -271,7 +271,7 @@ int CompassSensor::readSample(long *data, int64_t *timestamp) * @brief This function will return the current delay for this sensor. * @return delay in nanoseconds. */ -int64_t CompassSensor::getDelay(int32_t handle) +int64_t CompassSensor::getDelay(int32_t /*handle*/) { VFUNC_LOG; return mDelay; diff --git a/60xx/libsensors_iio/CompassSensor.IIO.9150.h b/60xx/libsensors_iio/CompassSensor.IIO.9150.h index 6a51338..6e9bf03 100644 --- a/60xx/libsensors_iio/CompassSensor.IIO.9150.h +++ b/60xx/libsensors_iio/CompassSensor.IIO.9150.h @@ -48,7 +48,7 @@ public: virtual int64_t getDelay(int32_t handle); // unnecessary for MPL - virtual int readEvents(sensors_event_t *data, int count) { return 0; } + virtual int readEvents(sensors_event_t* /*data*/, int /*count*/) { return 0; } int readSample(long *data, int64_t *timestamp); int providesCalibration() { return 0; } diff --git a/60xx/libsensors_iio/MPLSensor.cpp b/60xx/libsensors_iio/MPLSensor.cpp index 9737ef1..b5b9e47 100644 --- a/60xx/libsensors_iio/MPLSensor.cpp +++ b/60xx/libsensors_iio/MPLSensor.cpp @@ -877,21 +877,21 @@ int MPLSensor::enableQuaternionData(int en) return res; } -int MPLSensor::enableTap(int en) +int MPLSensor::enableTap(int /*en*/) { VFUNC_LOG; return 0; } -int MPLSensor::enableFlick(int en) +int MPLSensor::enableFlick(int /*en*/) { VFUNC_LOG; return 0; } -int MPLSensor::enablePedometer(int en) +int MPLSensor::enablePedometer(int /*en*/) { VFUNC_LOG; @@ -1010,7 +1010,7 @@ int MPLSensor::enableOneSensor(int en, const char *name, int (MPLSensor::*enable return (this->*enabler)(en); } -int MPLSensor::enableSensors(unsigned long sensors, int en, uint32_t changed) { +int MPLSensor::enableSensors(unsigned long sensors, int /*en*/, uint32_t changed) { VFUNC_LOG; inv_error_t res = -1; @@ -1758,7 +1758,7 @@ int MPLSensor::update_delay() { /* For Third Party Accel Input Subsystem Drivers only */ /* TODO: FIX! data is not used and count not decremented, results is hardcoded to 0 */ -int MPLSensor::readAccelEvents(sensors_event_t* data, int count) +int MPLSensor::readAccelEvents(sensors_event_t* /*data*/, int count) { VHANDLER_LOG; @@ -1859,7 +1859,7 @@ int MPLSensor::executeOnData(sensors_event_t* data, int count) /* TODO: This should probably be called "void cacheEvents(void)" * And executeOnData() should be int readEvents(data,count) */ -int MPLSensor::readEvents(sensors_event_t *data, int count) { +int MPLSensor::readEvents(sensors_event_t* /*data*/, int /*count*/) { int lp_quaternion_on = 0, nbyte; @@ -1910,7 +1910,7 @@ int MPLSensor::readEvents(sensors_event_t *data, int count) { #endif if (rsize < (nbyte - 8)) { - LOGE("HAL:ERR Full data packet was not read. rsize=%ld nbyte=%d sensors=%d errno=%d(%s)", + LOGE("HAL:ERR Full data packet was not read. rsize=%zd nbyte=%d sensors=%d errno=%d(%s)", rsize, nbyte, sensors, errno, strerror(errno)); return -1; } @@ -2032,7 +2032,7 @@ int MPLSensor::readEvents(sensors_event_t *data, int count) { } /* use for both MPUxxxx and third party compass */ -int MPLSensor::readCompassEvents(sensors_event_t *data, int count) +int MPLSensor::readCompassEvents(sensors_event_t* /*data*/, int count) { VHANDLER_LOG; diff --git a/60xx/libsensors_iio/SensorBase.cpp b/60xx/libsensors_iio/SensorBase.cpp index 21d0ed0..14e8861 100644 --- a/60xx/libsensors_iio/SensorBase.cpp +++ b/60xx/libsensors_iio/SensorBase.cpp @@ -75,7 +75,7 @@ int SensorBase::getFd() const return data_fd;
}
-int SensorBase::setDelay(int32_t handle, int64_t ns)
+int SensorBase::setDelay(int32_t /*handle*/, int64_t /*ns*/)
{
return 0;
}
@@ -128,7 +128,7 @@ int SensorBase::openInput(const char *inputName) return fd;
}
-int SensorBase::enable(int32_t handle, int enabled)
+int SensorBase::enable(int32_t /*handle*/, int /*enabled*/)
{
return 0;
}
|