Skip to content

Commit b269603

Browse files
committed
fix compiler warning in SHTSensor::setAccuracy()
SHTSensor::setAccuracy(SHTAccuracy newAccuracy) is simply returning false in the base class, since most of the sensors don't support it. as such, 'newAccuracy' is newer used. Mark it as unused to get rid of the compiler warning in restrictive compilation setups
1 parent 0940ee6 commit b269603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SHTSensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class SHTSensorDriver
157157
* Set the sensor accuracy.
158158
* Returns false if the sensor does not support changing the accuracy
159159
*/
160-
virtual bool setAccuracy(SHTSensor::SHTAccuracy newAccuracy) {
160+
virtual bool setAccuracy(__attribute__((unused)) SHTSensor::SHTAccuracy newAccuracy) {
161161
return false;
162162
}
163163

0 commit comments

Comments
 (0)